2

In Mac OS a new file can be created from the terminal by using the touch command. For example:

$ touch hello_world.rb.

Is there a way to create a new file of any type in cmd for Windows?

Sean Hetzel
  • 390
  • 1
  • 2
  • 10

1 Answers1

6

To make a file with some text, do

echo some_text > hello_world.rb

Or, as seen in the comments,

type nul > hello_world.rb

(Note that you actually type type.)

Brōtsyorfuzthrāx
  • 3,959
  • 3
  • 33
  • 53
Sean Hetzel
  • 390
  • 1
  • 2
  • 10