DelphiFAQ Home Search:
General :: Programming :: Delphi
General Delphi related information.

Articles:

This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.
Recommended links on this topic:
Featured Article

Set a file's date time stamp

A couple of function calls are needed.. simply use this piece of code:

procedure SetFileDate (TheFileName: string; aDate: string);
 var
   f : integer;
 begin
   f := FileOpen (TheFileName, fmOpenReadWrite);
   try
     FileSetDate (f, DateTimeToFileDate ((StrToDateTime (aDate))));
   finally
     FileClose (f)
   end
 end;

Generated 16:01:50 on Jan 22, 2018