|
-
May 4th, 2010, 08:49 PM
#1
Thread Starter
New Member
detecting changes in a directory
I have worked with PHP and other programming languages but I am new to VB. I want to write an application that is run manually every day, and each time it is run it checks for modified and newly created files in a particular folder
what is the best way to do this?
-
May 4th, 2010, 08:59 PM
#2
Re: detecting changes in a directory
if you can leave your application open all the time you use the FileSystemWatcher class, if not you'll have to save all the files size that you need to check and comparing them each time your application is running.
* Rate It  If you Like it
__________________________________________________________________________________________
" Programming is like sex: one mistake and you’re providing support for a lifetime."
Get last SQL insert ID 
-
May 4th, 2010, 09:03 PM
#3
Re: detecting changes in a directory
You would have to have stored information about the previous contents of the folder in order to know what is new and what has been modified. You first need to decide what data you need to store and where you're going to store it. You would then want to look at using the Directory, File, DirectoryInfo and FileInfo classes from the System.IO namespace to get information about files in a folder.
-
May 4th, 2010, 11:03 PM
#4
Thread Starter
New Member
Re: detecting changes in a directory
thanks guys, but where do I save information about the files. in a database maybe?
-
May 4th, 2010, 11:09 PM
#5
Re: detecting changes in a directory
 Originally Posted by techfish
thanks guys, but where do I save information about the files. in a database maybe?
That's up to you. A database is certainly one option. You could also use an XML file, a CSV file, etc, etc.
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
|