Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Watch folders for changes 2

Status
Not open for further replies.

hkathuria

Programmer
Jun 16, 2003
4
US
I am trying to track multiple folders for any changes in files. Can it be done through VBscript. Is there a component which i can use to help me do this
 
Are you looking for a change in the number of files or changes to the files themselves?
 
A simple notification with the name of the folder containing the changed file would be good enough. I have a list of files which i would compare with whenever i receive this notification.
I have looked into a couple of programs like DirAlert, FolderWatch these Components have their preset action which are not much useful for me and they allow me to watch single folder only.
I have also looked into some API's like FindFirstChangeNotification and ReadDirectoryChangesW but API's are tough for me as have never programmed with them before moreover they let me watch single folders only.
 
Both FindFirstChangeNotification and ReadDirectoryChangesW will allow you to spot changes to an entire volume. However, FindFirstChangeNotification will then merely tell you that a change occurred, not which file it occurred to. ReadDirectoryChangesW, on the other hand, can return the filename of the changed file. As it happens I've just put together an example on using this API call in thread222-576673
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top