--- In [email protected], "tim11g" <gro...@...> wrote: > > Now I get WinError 5 (Access Denied) when I try to change the date. > However, the file is not open or locked. >
I figured it out - The Delphi help for FileSetDate fails to mention that is is necessary to open the file for writing (fmOpenWrite). I followed the source down to the underlying WinApi function, and the Windows SDK help for SetFileTime does say that "The file handle must have been created with GENERIC_WRITE access to the file" I still think the behavior of FileExists reporting False for files that exist but have very old dates is somewhat of a bug, or should at least be documented. (maybe it is by now - I'm still using D7)

