11-14-05, 11:33 #1Registered User
- Join Date
- Jul 2005
Unanswered: When file downloaded then run import
I wish to know if there is a way to react to when a file is placed in a specific directory, what I have at the moment is a scheduled task which runs every 30 minutes, checks whether a file exists and if it does and isn't empty it imports the XML file, however instead of waiting 30 minutes I wish to rn the import as soon as the user creates the file in a specific location, is this possible, can you monitor the directory constantly and then react once file appears ??
any assistance is greatly appreciated.
11-14-05, 22:44 #2Registered User
- Join Date
- Dec 2002
One way to do this might be to use MSMQ; not sure if you want to go to that extent.
Another might be to write a custom application that acts as a service and uses the Sleep([time]) command to "wake up" and process files more frequently.
One caveat; if you try to grab an XML file (or any type of file) while it's being built by another process, you may run into file access issues. One to handle this type of issue is to create the file with a temporary extension and then rename it to your target extension once the file is completely built.
hmscottHave you hugged your backup today?