Unix Command Line 'Touch' command in Windows Command Prompt
Sun May 29 04:44:17 2011
I was asked the other day how to do the "touch" command in the command prompt on a Win machine to create a new file.
Anyone who uses the command line of Unix based environments will have most likely used the following command to create a new file.
Creating the file 'test.txt' is just a simple matter of
OK, nothing new there. So how do we do this in Windows? The answer is simple. Open the Command Prompt, navigate to a folder in which you wish to create a file (cd to the Desktop for example) and type the following command.
and press enter.
copy nul test.txt
There are a bunch of extra arguments you could add in place of the
con which will let you enter content directly from cmd. Anyway, I'll let you look for those... and that's how you do it.