Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File date

Status
Not open for further replies.

fhutt

Programmer
Jul 7, 2006
79
AU
Hello,
This is my first post in this forum.
Could someone give me a code segment for changing the file creation date of a file.
Thanking you
fhutt
 
Hi

Tcl documentation said:
file mtime name ?time?
Returns a decimal string giving the time at which file name was last modified. If time is specified, it is a modification time to set for the file (equivalent to Unix touch).
Code:
file mtime "milleniumparty.jpg" [clock scan "2000.01.01"]

Feherke.
 
Thanks for your reply feherke.

I should have noted that I am trying to change the file creation date of a file on a Windows XP system.

I know the file "mtime name ?time?" function. This changes the last modified date and time, NOT the file creation date.
Thanks anyway.
fhutt
 
Hi

Hmm... Note that Tcl/Tk was designed to be platform independent. As file creation time can not be modified everywhere, I would say this possibility was lfet out intentionally. Just like setting the hidden attribute in Java.

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top