Category : commands...

(1 results found)

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.

Most recent posts

  1. Rain or Shine - Weather Forecast Available Now!
  2. Getting around Apple's silly rules for iOS 10
  3. Localising App Names for iOS and Android
  4. Today - Powerful To-Do App Now Available on iOS & Android
  5. New app 'Gem Plinko' Released on iOS

Search site:

Apps by Ubacoda.com

Click the app icons to see more info


Archives

Categories