RAD Studio
ContentsIndex
PreviousUpNext
Using TOUCH.EXE

TOUCH.EXE updates a file's date stamp so that it reflects your system’s current time and date.

touch [<options>] <filename> [<filename>...] 

If TOUCH cannot find a file that matches the name you specify, it creates a zero-length file with the correct date stamp. To suppress automatic file creation, use the -c option.  

Because TOUCH is a 32-bit executable, it accepts long file names. In addition, you can use file names that contain the wildcard characters * and ? to “touch” more than a single file at a time. Use the -s option to update matching files in all subdirectories.  

Before you use TOUCH, make sure your system's internal clock is set correctly.

TOUCH.EXE supports several command line options.  

TOUCH Options  

Option 
Description 
-c  
Don't generate file if it doesn't already exist.  
-d<mm>-<dd>-<yy>  
Sets the date of the file to the specified date.  
-r<filename>  
Sets the time and date of file to match those of <filename>.  
-h  
Displays help information (same as typing TOUCH without options or filenames.  
-s  
Recurses through subdirectories.  
t<hh>:<mm>:<ss>-  
Sets the time of the file to the specified time.  
-v  
Verbose mode. Shows each file that has been TOUCHed.  
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!