G
Guest
Hello,
I am writing an application that processes xml files that are stored in a
folder. The application picks up the files in a folder, processes them and
then deletes them.
What is the best approach on loading the xml files from the folder into my
application?
At the moment I am using the System.IO.FileSystemWatcher to monitor files
that are created in the folder (created is same as copied to) and then I add
the filename to a Queue object. This has as drawback that if files are in the
folder before the application is started I have to load the into my
application manually.
If I have to write code to load the files that are already in folder before
the FileSystemWatcher becomes active, why would I even use the
FileSystemWatcher? I could use a timer and scan the directory on every
Timer.Elapsed.
I need a robust solution for 'monitoring' a folder and processing the files
in a Windows Forms application.
Philip Wagenaar
I am writing an application that processes xml files that are stored in a
folder. The application picks up the files in a folder, processes them and
then deletes them.
What is the best approach on loading the xml files from the folder into my
application?
At the moment I am using the System.IO.FileSystemWatcher to monitor files
that are created in the folder (created is same as copied to) and then I add
the filename to a Queue object. This has as drawback that if files are in the
folder before the application is started I have to load the into my
application manually.
If I have to write code to load the files that are already in folder before
the FileSystemWatcher becomes active, why would I even use the
FileSystemWatcher? I could use a timer and scan the directory on every
Timer.Elapsed.
I need a robust solution for 'monitoring' a folder and processing the files
in a Windows Forms application.
Philip Wagenaar