touch.exe is touch for Windows. touch is a standard Unix and Linux command used to change files' access and modification timestamps. It is also used to create new and empty files.
touch.exe is a Win32 console utility and it supports all options listed in the POSIX:2008 touch specification.
Extra touches: it can also change files creation time, has full Unicode support and includes recursive and verbose option. It even lets you pause on exit to so you can run it without cmd.exe!
> Source code
> Version history
> Exit codes
Usage: touch [-acmpsRvx] [-r REFFILE | -t TIME | -d DATETIME] FILE... A FILE argument that does not exist is created empty, unless -c or --no-create is supplied. -a, --access-time Change file access time. -c, --no-create Do not create any new files. -m, --modif-time Change file modification time. -p, --pause-exit Pause on exit. -s, -R, --recursive Recursively touch files in specified directory and all subdirectories. -v, --verbose Output the result of every file processed. -x, --creation-time Change file creation time. -r, --reference REFFILE Use this file's times instead of current time. -t, --time TIME Use [[CC]YY]MMDDhhmm[.ss] instead of current time. -d, --date DATETIME Use YYYY-MM-DDThh:mm:SS[.frac] instead of current time. -h, --help Display this help and exit. --version Display version information and exit. Note that the -d and -t options accept different time-date formats. Mandatory arguments to long options are mandatory for short options too.
|0||Successful and all requested changes were made.|
|-1||Missing file operand.|
|-2||Cannot retrieve source touch time (-r, -t, -d options or system time error).|
|> 0||If positive, the exit code is the number of files for which the times could not be successfully modified. With the --no-create option, this number includes the files that did not exist and were not created.|