how to get copied files from windows to my application ??
-
hi every body i have desktop application i want to get the copied files names from windows to my application ex: the user will copy any file from pc and i have button in my form i want when user click this button the name of files which he copied it appear in list box how can i do this ?? thanks in advance :)
-
hi every body i have desktop application i want to get the copied files names from windows to my application ex: the user will copy any file from pc and i have button in my form i want when user click this button the name of files which he copied it appear in list box how can i do this ?? thanks in advance :)
Hi, there is a class called System.IO.FileSystemWatcher. Using this class you can observe file actions on directory or file. If a file is copied the FileSystemWatcher will throw the event OnCreated. Problem is that you don't know if it is a newly created file or a copied file... but maybe it is a good point to start. Regards Sebastian
It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.
-
Hi, there is a class called System.IO.FileSystemWatcher. Using this class you can observe file actions on directory or file. If a file is copied the FileSystemWatcher will throw the event OnCreated. Problem is that you don't know if it is a newly created file or a copied file... but maybe it is a good point to start. Regards Sebastian
It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.
thanks for reply baut file system watcher i must give it one directory to watch it i want get the name of the files on any where on computer thanks again for reply
-
thanks for reply baut file system watcher i must give it one directory to watch it i want get the name of the files on any where on computer thanks again for reply
Okay, well, but isn't your drive a directory?
It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.
-
hi every body i have desktop application i want to get the copied files names from windows to my application ex: the user will copy any file from pc and i have button in my form i want when user click this button the name of files which he copied it appear in list box how can i do this ?? thanks in advance :)
The FSW, as bad as it is, is the only solution you have. There is no event or any signal that says there is a copy operation going on.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
Okay, well, but isn't your drive a directory?
It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.
Watching an entire drive is not a good idea. The FSW starts to perform badly the more you have it watch. He really doesn't have a solution to use since there is nothing that signals "Hey, there's a copy going on!".
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008