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
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