none
How can I wait till the file Closes and then Fire the FileSystemWatcher event? RRS feed

  • Question

  • Hi

    In my code I have a FileSystemWatcher that moniters file change. if the file is modified it gets uploaded to a certain directory but now I want the fileWatcher to wait till the file is closed before uploading it. How can I do this.

    Please help.

    Wednesday, September 27, 2006 9:48 AM

Answers

  • There is no other option then trying to open the file, when it succeeded; upload it, otherwise wait and retry.
    Wednesday, September 27, 2006 11:19 AM
    Moderator

All replies

  • There is no other option then trying to open the file, when it succeeded; upload it, otherwise wait and retry.
    Wednesday, September 27, 2006 11:19 AM
    Moderator
  •  PJ. van de Sande wrote:
    There is no other option then trying to open the file, when it succeeded; upload it, otherwise wait and retry.

    Write this is True!!!

    Try to open File in a write mode in Try/Catch if succeeds then its ok otherwise wait and try again.

    Cheers ;-)

    Wednesday, September 27, 2006 11:28 AM