Site Navigation

Jun 18, 2010

Win7Tip: Change File Time Stamps with Cygwin and Touch

Problem: I need to change the time stamp of Windows files, but I don't what to buy or install some silly shareware application.

Solution: Install Cygwin and use the Unix touch utility to modify the timestamp.

  1. Start Cygwin.
  2. Change to your C: drive: cd /cygdrive/c
  3. Navigate to your file.
  4. Use the touch command.
  5. For example, set the date to Jan 6, 2010 at 4:20pm:
    touch -d '6 Jan 2010 16:20' myfile.txt

That's all there is too it.

No comments:

Favorite Links Feed