I'd like to get a file last modified time in Delphi.
Normally something like FileAge()
would do the trick, only the problem is: if I overwrite *File A* with File B using CopyFile
, File A's modified date is not updated with current overwrite time as it should(?)
I get that: CopyFile
also copy file attributes, but I really need to get the modified date that also works when a file is overwritten.
Is there such function? My whole application relies on modification time to decide whether or not I should proceed with files!
EDIT Just to clarify: I'm only monitoring the files. It's not my application who's modifying them.
SHFileOperation
. – Burbotget
the modified file's date, not change it – MufiCopyFile
which doesn't update this value. This way is not safe if you're going to monitor changes by that. Imagine, that I can modify just this date/time in my file manager without actually changing the file content. In that case your application might be mislead by that. – BurbotCreateTime
get's totally wrong in this case -> support.microsoft.com/kb/172190/en-us (btw still the same with W7) – Franconian