ASSTO
29-03-2011, 22:08
Ciao a tutti,
qualcuno conosce un metodo per intercettare se in una cartella viene spostato un qualsiasi file?
Ho tentato con un oggetto FileSystemWatcher ma l'evento viene intercettato solo se creo un file all'interno della cartella, non se ce lo sposto...
fsWatcher.Filter = "*.*"
fsWatcher.IncludeSubdirectories = True
fsWatcher.Path = "C:\Users\Luca\Desktop\macero"
fsWatcher.NotifyFilter = NotifyFilters.LastWrite
AddHandler fsWatcher.Changed, AddressOf filecreato
AddHandler fsWatcher.Created, AddressOf filecreato
fsWatcher.EnableRaisingEvents = True
qualcuno conosce un metodo per intercettare se in una cartella viene spostato un qualsiasi file?
Ho tentato con un oggetto FileSystemWatcher ma l'evento viene intercettato solo se creo un file all'interno della cartella, non se ce lo sposto...
fsWatcher.Filter = "*.*"
fsWatcher.IncludeSubdirectories = True
fsWatcher.Path = "C:\Users\Luca\Desktop\macero"
fsWatcher.NotifyFilter = NotifyFilters.LastWrite
AddHandler fsWatcher.Changed, AddressOf filecreato
AddHandler fsWatcher.Created, AddressOf filecreato
fsWatcher.EnableRaisingEvents = True