FileSystemWatcher question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
when I move them? Any help would be appreciated.
 
nbrege said:
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
when I move them? Any help would be appreciated.

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top