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);
  f : integer;
  f := FileOpen (TheFileName, fmOpenReadWrite);
    FileSetDate (f, DateTimeToFileDate ((StrToDateTime (aDate))));
    FileClose (f)

Content-type: text/html


2006-07-28, 06:16:31
ajpatil[at] 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. :)
2014-12-26, 07:50:38
anonymous from Venezuela  
Liebe MonikaDeine Karte ist wunderschf6f6f6f6f6n gedworen! Herzlichen Glfcckwunsch! Der Flfcgel sieht ja genial aus, genau wie die vielen Blumen. Darf ich fragen womit Du die tollen Glitzer-Bordfcren gemacht hast? Ich wfcnsche Dir viel Glfcck!c4 festi Umarmig und en schf6ne Tag!Pati
2014-12-27, 07:09:08
anonymous from Sweden  
Wow Monika, dis Ke4rtli isch wundervoll!!! Soviel schf6ni Details,und die4 Stempel....(i mf6chtes<a href=''> ugbdeinnt</a> au ha ;-))De4 Text isch au genial und mega schf6n i Szene gsetzt!!! Und die4 viele4 schf6ne4 Blfcemli, *tre4um*....Es schf6ns reschtlichs Wucheend!!Lie4bs Grfcessli conni



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: