Has a file changed?
I want to detect if a file has changed. I don't want to be notified, I just want to go back and look at it and see if the content has changed. I do not want to have to read the content. I'm happy that it could be circumventable. What I'm looking for is a 99% sure way of seeing if a file has changed.
On Unix you'd use the 'stat' call and check for modified date or file size as your indicator. Don't know what Win would use.
Clear the archive flag.
Trouble with relying on the archive bit is that some other program might set or unset it, like a backup program. I'd rely on a combination of file size and last modified.
If you have the .NET runtime installed, they have a class called FileSystemWatcher that can respond to change events within the file system
If you have .NET you can easily use an MD5 checksum to check if the file has changed. This is what I do in my version control system. Works like a champ. Of course this requires writing a few lines of code. Just thought I'd throw this at you.
Use the file date. It will work 99% of the time.
create a hash for each file in each folder and periodically rerun the hash to see if there is any diff.
Sound like date/time + size will work ok for me.
No need for .NET programming for computing hashes
Just me (Sir to you)
No need to use .NET to watch file systems either.
Are you male or female Jan?
look into md5sum.
The guy asked to not have to read the contents of the file. Anytime you do a checksum/hash, you're reading the contents of the file, no?
Yes, the OP did specify that requirement. However, given that md5sum can do its "thing" extremely quickly, it may be useful to either the OP or others reading this topic. Just depends on where you are placed on the accuracy vs speed trade-off
Fog Creek Home