I’ve been searching now for HOURS on Google (and here).
And I cannot find a solution.
I want to CHANGE the “Created Filetime” (= creation filetime) in DELPHI 6.
Not the “Modified file time” (for which a simple call to “FileSetDate()” is needed)
and not the “Last accessed file time”.
How do I do this?

Call the
SetFileTimeWindows API function. PassnilforlpLastAccessTimeandlpLastWriteTimeif you only want to modify the creation time.You will need to obtain a file handle by calling
CreateFile, or one of the Delphi wrappers, so this is not the most convenient API to use.Make life easier for yourself by wrapping the API call up in a helper function that receives the file name and a
TDateTime. This function should manage the low-level details of obtaining and closing a file handle, and converting theTDateTimeto aFILETIME.I would do it like this:
I had to add the declaration of
FILE_WRITE_ATTRIBUTESbecause it is not present in the Delphi 6 Windows unit.