473,734 Members | 2,375 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FileSystemWatch er Created Event Triggers Early

I have a FileSystemWatch er that triggers when a PDF file is created.
However, the creation of the PDF file is about a 7 or 8 second process ... I
cannot refer to the file during that time because it does not yet exist. If
I set up a loop using the Sleep API call, it loops forever and the software
that creates the PDF file stops progressing and the file never finishes
getting created. The FileSystemWatch er was triggered only on the beginning
of the process.

Is it possible to use the FileSystemWatch er to trigger when a file is
created and not just conceived?
Jul 21 '05 #1
2 2423
Hi

Well you can try monitering both the Created and the Changed events of the FileWatcher for the PDB File.

The documentation of the Changed event states
The change of a file or folder. The types of changes include: changes to size, attributes, security settings, last write, and last access time.

So this event will fire when there is change to *size* which should happen after the process of compilation is compelete.
--
Regards,
Saurabh Nandu
Master C#, the easy way...
[ www.MasterCSharp.com ]

"Phil Galey" wrote:
I have a FileSystemWatch er that triggers when a PDF file is created.
However, the creation of the PDF file is about a 7 or 8 second process ... I
cannot refer to the file during that time because it does not yet exist. If
I set up a loop using the Sleep API call, it loops forever and the software
that creates the PDF file stops progressing and the file never finishes
getting created. The FileSystemWatch er was triggered only on the beginning
of the process.

Is it possible to use the FileSystemWatch er to trigger when a file is
created and not just conceived?

Jul 21 '05 #2
Hi

Well you can try monitering both the Created and the Changed events of the FileWatcher for the PDB File.

The documentation of the Changed event states
The change of a file or folder. The types of changes include: changes to size, attributes, security settings, last write, and last access time.

So this event will fire when there is change to *size* which should happen after the process of compilation is compelete.
--
Regards,
Saurabh Nandu
Master C#, the easy way...
[ www.MasterCSharp.com ]

"Phil Galey" wrote:
I have a FileSystemWatch er that triggers when a PDF file is created.
However, the creation of the PDF file is about a 7 or 8 second process ... I
cannot refer to the file during that time because it does not yet exist. If
I set up a loop using the Sleep API call, it loops forever and the software
that creates the PDF file stops progressing and the file never finishes
getting created. The FileSystemWatch er was triggered only on the beginning
of the process.

Is it possible to use the FileSystemWatch er to trigger when a file is
created and not just conceived?

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2450
by: Jie | last post by:
H I use FileSystemWatcher.Changed event to capture an excel workbook being saved. Since the save button in excel is always enabled and each time click save the workbook is saved again and its modified time will be the current time. It seems that the file watcher changed event is not fired if the workbook has no changes since last save although the workbook last modified time has been changed. Any ideas Thank Jie
3
1592
by: Florida Development | last post by:
I have the need to monitor a directory for the arrival of files and then to run some processing on those new files. This is easy enough conceptually, the problem I have is that I get an event to handle when the file is first created yet is not fully written to the disk yet. Is there some simple way (that will pass a code review) that I can determine when the file write to disk has been completed so I can do my processing? Thank you.
2
371
by: Phil Galey | last post by:
I have a FileSystemWatcher that triggers when a PDF file is created. However, the creation of the PDF file is about a 7 or 8 second process ... I cannot refer to the file during that time because it does not yet exist. If I set up a loop using the Sleep API call, it loops forever and the software that creates the PDF file stops progressing and the file never finishes getting created. The FileSystemWatcher was triggered only on the...
9
7128
by: Tushar | last post by:
Followup-To: microsoft.public.dotnet.general Does anyone know when is this event raised, is it: 1) When the file is created but may not have been closed 2) When the file is created AND it has been closed I am using this control in a Windows-Service I've developed. It works hoever the problem I'm having is that the file does not seem to be available when I receive this event. If I include a delay of a few seconds using Sleep(3000) for...
0
2436
by: Silver Oak | last post by:
Hi, I'm experimenting with FileSystemWatcher but it doesn't seem like it fires when a new file is created. Everytime I create a new file, it fires Changed event i.e. Case WatcherChangeTypes.Created never fires. Please point out my mistake. Thanks. Michael
1
1999
by: josh | last post by:
Hi, I have several independent, system components that write audit events to a database locally via ODBC and remotely via TCP, and I have a requirement to audit when the database is available for modification. First, does SQL Server have a concept of starting/stopping specific database instances? Or does my database instance "stop" only when the NT service MSSQLSERVER stops? Second, Oracle has system event triggers, e.g. AFTER...
2
1730
by: Ripley | last post by:
I am trying to find out exactly when this even fires when a file is "created" in a directory being monitored. That is, for a large file, that takes several minutes to upload, will the created event fire as soon as the file starts loading, or only when the file has been completely uploaded. I can't find any documentation to this at MSDN. Thanks, Ripley
0
1303
by: Alan Mailer | last post by:
After a user edits a Cell in one of my DataGridViews, I want to make sure what the user has typed in is 'valid'. If it's not, I want to Cancel the Edit. Ok, you say, use the CellValidating event for this. That's fine, I have... BUT... As you experts probably know, the CellValidating event triggers not just when a user EDITS a cell, but seemingly any time a Cell is selected. (Feel free to tell me I'm wrong about this, by the way).
2
2319
by: Shoaib Ahmed | last post by:
I have deleted the .MDF file accidently. I have never created a backup early on. Can any body tell me, where this MDF is gone after delete? I am using SQL Server 2000 Enterprise Manager.
0
8946
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8776
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9310
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9182
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6735
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6031
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3261
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2724
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.