Groups | Blog | Home
all groups > vb.net > january 2006 >

vb.net : FileSystemWatcher question


nbrege
1/25/2006 7:40:02 PM
I am writing a program that watches a certain folder for incoming files &
then moves those files to another folder. Here's the problem: if I copy a
group of files into the watched folder it works fine, but if I move a group
of files into the watched folder it doesn't do anything, the event handler
never triggers. What is the proper notify filter to use to watch for new
files in a folder? I have tried both the Size & LastWrite filters but neither
does what I want. Why does it work when I copy files into the folder but not
Jarod_24
1/26/2006 12:00:00 AM

[quoted text, click to view]

maybe the .Create filter (if there is one)

the filewatcher got several events that you can subscribe to like .Changed
..Error .Renamed and so on.
subscribe to them all and see which one triggers when you move the files
into the folder.

Addhandler, filesystemwatcher.Changed, AddressOf yourmethod


sub yourmethod(sender, e)
'code here
en sub

AddThis Social Bookmark Button