DelphiFAQ Home Search:

Set a file's date time stamp

 

commentsThis article has not been rated yet. After reading, feel free to leave comments and rate it.

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;

Comments:

2006-07-28, 06:16:31
ajpatil[at]mail.com from India  
This is really helpfull to me as in some project I need to change the time stamp of a file and this handy code help me to do it as very less time.

Many thanks to the auther. :)

 

 

NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.
 

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: