Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

Rated
Read 34,984 times

Contents

Related Categories

Watching Folder Activity in VB.NET - Conclusion

JayeshJain

Conclusion

Hopefully this article has shown you how simple it is to incorporate the FileSystemWatcher class into your application.

Here are few things that you could do with FileSystemWatcher class:

  • Import a file the moment it is copied/uploaded to a particular folder
  • Recreate a file if the file is deleted
  • Notify all applications -- depending upon a file -- the moment a file is renamed, deleted or updated

Jayesh Jain is working as a Business Analyst in Auckland, New Zealand. He has several years of n-Tier development experience in developing interactive client solutions. He has a passion for Web development and in the spare time he likes to write articles. Contact him at: jainjayesh74@yahoo.com

Comments

  • Re: Cross-Threading

    Posted by D'Scouser on 06 Feb 2008

    In VB2005 there is a painful cross-threading error that throws an InvalidOperationException when returning text from the fileSystemWatcher to the main form. This can be resolved by ...

  • One way...

    Posted by wduros1 on 04 Dec 2005

    Although the file watcher provides notification of a file create, it provides this notification at the moment of the file "creation", not the moment of the file "completion" if you know what I mean. ...

  • Running this code as a service

    Posted by tlombardi on 26 Sep 2005

    Hi I have tried this code to use it for watching a folder for tif files which I wish to print automatically. I have managed to get it to work in an application mode. However I cant seem to make it wor...

  • Posted by jwillis27640 on 12 Jul 2005

    Thanks JMurDock!! Maybe you can help me with this. I am using Excel 2003 to parse the XML because I don't know what information might be in the file. It has varying field information so I do it like t...

  • Posted by jmurdock on 12 Jul 2005

    [quote][1]Posted by [b]jwillis27640[/b] on 12 Jul 2005 05:14 PM[/1]
    What are you doing with your service? I need the same type of thing but I need to parse the xml and sent it to SQL server. I have d...