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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing file date

Status
Not open for further replies.

Technobie

MIS
Oct 13, 2003
18
US
Hi All,

I want to be able to change the date on a file to two weeks ago. I am testing a script, but need the modified date changed.

Can anyone throw a cmd my way?

Thanks!

Chris Driver
//UNIX like TeePee. No Windows, No Gates, Apache inside.\\ :D
 
Try the [tt]touch[/tt] command. Look at the man page for options. You can have it set a date to be one you specify, or use the date on another file.

Hope this helps.

 
Awesome! Thanks! I knew I could set the current time by using "touch filename" - I should have just checked the man page.

Thanks again!

Chris Driver
//UNIX like TeePee. No Windows, No Gates, Apache inside.\\ :D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top