Touch Utility for Windows

I was desperately looking for a command line utility that changes the time stamp of files or sets the time stamp to that of some other file. It had to be executable from command line as I wanted to embed it in some script I was working on. After some extensive search the best option I was able to find was this.

Here is a snapshot of its features:

Usage: touch [-h] [-a] [-C] [-m] [-c] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]]
-a: Modify access time
-C: Modify creation time
-m: Modify modification time
-c: Do not create file if not found
-r: Use file as time source instead of current time
-t: Use specified time instead of current time
-h: This help text
Options -r and -t are mutually exclusive.
By default, all times will be modified (access, creation and modification).

And here is a practical example:

> touch -a -C -m -r C:\source.txt C:\target.txt

The tool can be downloaded from here.

Thanks to Jörgen Sigvardsson for developing this useful tool.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: