Wednesday, August 13, 2014

Change file timestamp in Windows

Sometimes you need to modify a file’s timestamp and don’t want to change the content of the file. Copy command has an easy way to do it:

copy /b filename.ext +,,

This command will assign the current time and date to filename.ext without modifying the file content.  It will replace the original file, so make sure you have a backup for the file.

For reference, check: http://technet.microsoft.com/en-us/library/bb490886.aspx