FileSystemWatcher doesn't fire with Activesync

  • Thread starter Thread starter byamla
  • Start date Start date
B

byamla

I've got a FileSystemWatcher in a Windows Service watching a directory
sync'ed under ActiveSync. However, the Created event doesn't fire when
ActiveSync copies the files from the PDA to the local disk. It fires
every time if I grab one of the files that's already been sync'ed and
copy it right back into the directory. Is there any way to work around
this?

Here's the code if anyone can offer some insight:

Protected Overrides Sub OnStart(ByVal args() As String)
Dim path As String =
Environment.GetFolderPath(Environment.SpecialFolder.Personal) &
"\PDT8100_2002 My Documents\tagfiles"
FileSystemWatcher1.Filter = "*.txt"
FileSystemWatcher1.IncludeSubdirectories = False
FileSystemWatcher1.Path = path
FileSystemWatcher1.EnableRaisingEvents = True
AddHandler FileSystemWatcher1.Created, AddressOf OnCreated
End Sub

Thanks very much,
Logan Byam
 

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