Touch for Win32 (ver 1.0) Abandoned Freeware Steve P. Millers Touch displays or sets the created, access, and modified times of one or more files. Usage: touch [/s] [/h] [/p] [/q] [/v] [/c] [/m] [/a] [/r file] [/d mm-dd[-[cc]yy]] [/t hh[:mm[:ss[.ms]]]] filespec ... /s Process subdirectories. /h Process hidden/system files/directories. /p Prompt for each file (Yes/No/All/Quit). Ignored in view mode. /q Quiet mode; Only display errors; Ignored in view mode. /v View mode; Display times rather than set times. /c View/set created time. /m View/set modified time; Default if /a and /c are not specified. /a View/set accessed time. /r Reference file; Use this file's date and time to set other files. /d Date: month, day, century, year. /t Time: hour (0-24), minutes, seconds, milliseconds. In view mode (/v), the /p, /q, /r, /d, and /t options are ignored. In set mode, the default is to use the current date and time. Use the /r, /d, and/or /t options to override the default set time. The century (cc) is assumed to be 19 for years 69-99, and 20 for years 00-68. ---------- You may notice that you are unable to set the date and/or time of a file to some exact setting. It is possible that the operating system may need to round a value you have specified up or down to overcome limitations in the file system. The following are some facts about FAT and NTFS: FAT Created time is accurate to the nearest 10 milliseconds (rounded down). Modified time is accurate to the nearest 2 seconds (up on NT, down on 95). Accessed time is accurate to the nearest day (rounded down). Dates can range between 1/1/1980 and 12/31/2107 Dates and times are physically stored as locally adjusted times. NTFS Created time is accurate to the nearest 100 nanoseconds. Modified time is accurate to the nearest 100 nanoseconds. Accessed time is accurate to the nearest 100 nanoseconds. Dates can range between 1/1/1601 and 9/13/30828 Dates and times are physically stored as UTC/GMT times. Overview of command line syntax (using FOO as the example program) ============================================================================= - Running FOO with a /? option will display the full command line usage. For example, "foo /?" will display the complete help screen for FOO. - All command line options can be specified with either a leading / or -. For example, "foo /?" is equivalent to "foo -?" - Options that do not take extra arguments can be grouped together. For example, "foo /s /h /r *" is equivalent to "foo /shr *" - Options that do take extra arguments can be placed at the end of a grouping. For example, "foo /s /h /r /t3 *" is equivalent to "foo /shrt3 *" - Spaces are optional between options and their arguments. For example, "foo /t3 *" is equivalent to "foo /t 3 *" FOO might take one or more filespecs. A filespec can be any combination of a file, path, directory, or wildcard search string. Here are some example filespecs: . matches all files in the current directory. * matches all files in the current directory. *.exe matches all files with ".exe" extension in the current dir. a*.xl? matches all files in the current directory that start with an "a" and end with ".xl" followed by any single character. readme matches a single file named "readme" in the current dir. c:\bin\* matches all files in the c:\bin directory. c:\bin\ matches all files in the c:\bin directory. c:\bin matches all files in the c:\bin directory. c:\bin\. matches all files in the c:\bin directory. c:\bin\readme matches a single file named "readme" in the c:\bin dir. d:* matches all files in the d: drive's current directory. \\server\share\* matches all files on the specified network share. If FOO takes filespecs, it also supports recursive directory processing. Just add a /s to the command line of FOO, and FOO will expand its file matching search to include all subdirectories under the initial directory for that filespec. For all the examples above, the /s option would repeat the search described for every subdirectory under the starting directory. FOO is smart enough to break apart the path portion of the filespec from the file or wildcard portion. A filespec like "/s c:\bin\readme" will find all files named "readme" in the c:\bin directory and in subdirectories under the c:\bin directory.