FileInfo Class
-
I am using the lastAccess property of this class to compare two files to determine which one is the latest copy. It works on my computer just fine but once it is installed and run on another pc it always returns todays date and time is equal to 12:00 am. I have checked the two seperate files and there accessed date is definetely not what it is displaying. Anybody got any ideas or thoughts on this issue ??
-
I am using the lastAccess property of this class to compare two files to determine which one is the latest copy. It works on my computer just fine but once it is installed and run on another pc it always returns todays date and time is equal to 12:00 am. I have checked the two seperate files and there accessed date is definetely not what it is displaying. Anybody got any ideas or thoughts on this issue ??
LastAccessTime indicates when the file was last read, not when last written. You probably want LastWriteTime. To stop the file system constantly writing the last access time, by default it updates once an hour. See Optimizing NTFS Performance[^] (from the XP Resource Kit) for more details. You can apply a registry setting[^] to disable the Last Access Time updates completely. It sounds as if this has been done on the PCs you're testing with. Stability. What an interesting concept. -- Chris Maunder