Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2005
    Posts
    8

    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.

  2. #2
    Join Date
    Dec 2002
    Posts
    1,245
    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.

    Regards,

    hmscott
    Have you hugged your backup today?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •