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.

touch fileName.fileExtenstion

Creating the file 'test.txt' is just a simple matter of touch test.txt.

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.

copy nul test.txt
and press enter.

That's it.

There are a bunch of extra arguments you could add in place of the nul, like 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.

← back

Most recent posts

  1. Flashcards Maker - the app the helps you learn in a flash
  2. Convert Font Suitcase to TTF in 3 Easy Steps
  3. Rain or Shine - Weather Forecast Available Now!
  4. Getting around Apple's silly rules for iOS 10
  5. Localising App Names for iOS and Android

Search site:

Apps by Ubacoda.com

Click the app icons to see more info