|
-
Feb 7th, 2003, 11:07 AM
#1
Thread Starter
Lively Member
File System Watcher [Resolved]
Hey
Ive been reading about the FileSystemWatcher class present in VB.net which can raise events when a file is deleted, updated etc from a specific folder.
This appears much easier than the API calls needed in VB 6 however at the moment ive only seen examples that monitor one directory. Is it possible to create an application to monitor the whole hard drive for file / folder changes? At the moment performance is not an issue more if its possible.
Cheers.
Gav
Last edited by gav032; Feb 7th, 2003 at 12:39 PM.
-
Feb 7th, 2003, 11:11 AM
#2
Dim fsWatch As New FileSystemWatcher("c:\")
fsWatch.IncludeSubdirectories = True
-
Feb 7th, 2003, 11:27 AM
#3
Thread Starter
Lively Member
That it?
Omg! thats incredible!
Just out of interest, does that mean ill be able to monitor pretty much all file / folder activity on the system? What are the limitations of the file watcher? And can i watch for all files rather than ones with a specific file type?
Gav
-
Feb 7th, 2003, 11:31 AM
#4
You can watch for anything you want. If you dont use the filer property it will look for any file type.
-
Feb 7th, 2003, 11:37 AM
#5
Thread Starter
Lively Member
Sorry for keep posting! I just keep thinking of questions about it. After this i can safely resolve this thread though.
Can file watcher monitor new folders being created or folders being deleted too? I also presume it works in 98 and 2000 / XP systems too? Given thats it appears to be a standard class.
Thanks again.
Gav
Last edited by gav032; Feb 7th, 2003 at 11:41 AM.
-
Feb 7th, 2003, 12:09 PM
#6
yes and yes
-
Feb 7th, 2003, 12:39 PM
#7
Thread Starter
Lively Member
God i love Forums! How did we cope without them? 
Thanks for giving me all the information i needed!
Now i can resolve this thread! 
Thanks again.
Gav
-
Feb 7th, 2003, 12:40 PM
#8
-
Feb 5th, 2004, 05:38 AM
#9
Addicted Member
Is the .net sdk avaliable for download so I could get this to work on vb6?
Scott
**********
Visit my web page at www.hyphenex.ugtech.net
-
Feb 6th, 2004, 05:29 PM
#10
Thread Starter
Lively Member
As far as i am aware, you can only use the File Watcher Class in .NET. Thus, you could not incoporate this into VB6 since it requires the .NET Framework which .NET uses.
As for compatibility, the File Watcher class only runs on Windows 2000 +, excluding Windows 98 Users.
Regards
Gav
-
Feb 7th, 2004, 02:30 AM
#11
Addicted Member
If I downloaded and installed the .net SDK could I do this in vb6?
Scott
**********
Visit my web page at www.hyphenex.ugtech.net
-
Feb 7th, 2004, 04:09 AM
#12
Thread Starter
Lively Member
Not as far as i am aware, since VB6 does not run in the .NET framework. Perhaps you could make a control of sorts (is this possible in .net?) and then use this in vb6 but as far as i am aware your only option is to code that particular feature in .NET and then use VB6 for the rest of your things (Similar to what i did for a project last year.)
Gav
-
Mar 9th, 2004, 08:33 PM
#13
Junior Member
Filesystemwatcher
Is it any way to find who make changes on a file through filesystemwatcher, especially network user.
-
Mar 14th, 2004, 04:20 PM
#14
Thread Starter
Lively Member
Not that im aware of, because, im not sure Windows marks the file with the current / last edited user. However, Microsoft Office documents do contain these values, as do files held on an NTSC file system (Right click on file > Properties > Summary) , although Windows, by default, does not set this value, it is the Microsoft Office application or the user.
Cheers
Gav
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|