Hi,
I used FileInfo.LastWriteTime to know when was the exact last time where a certain file, let's say "c:\temp\test_file.txt" was CHANGED.
It works greate when someone is actually opens the file, make changes and then save - the FileInfo.LastWriteTime for this path is being updated with the time the file was changed.
But what happens in the following scenario:
Copy a file with the same name but with different content from other location on disc, and paste it in the "c:\temp\" folder (override the existing file) - the file "c:\temp\test_file.txt" was actually changed (overriden by a file with the same name but with different content) - BUT (!!!) the LastWriteTime of the file "c:\temp\test_file.txt" is not the time on which it was overriden, but it is actually the "LastWriteTime" of the file which we copied, and might be significantly earlier then the moment in which it was overriden.
In case I need to know the moment in which the file was overriden, is there any other way, AND PLEASE DON'T SUGGEST SOLUTIONs like registerring on FileChange events - I'm searching for a solution in which I don't have to keep a program running all the time like a service - my application may not be executed all the time, and I need to know when the file was overriden even if this moment was when my applicatoin was closed.
Thanks at Advance!