Create file in DOS edit/copy con

by Brett on November 21, 2006

When working in DOS sometimes I have the need to quickly create a file. Normally I would type “edit test.txt” which would open test.txt if it exists or create it if it doesn’t exist. This works well if I need to edit an existing file or type a lot of data. Note: use the alt key to navigate the menu in “edit” 

SP32-20061121-123114

edit test.txt

If I just need a quick file with only a few lines of text there is another method to quickly create a file. By typing “copy con test.txt”. It will then give a blank line to start typing the text that belongs in the file. Each time enter is hit it starts a new line and you will not be able to go back to the previous line. When you are finished typing the text hit CTRL+Z and hit enter. It will then create the file.

copy con test.txt

Previous post:

Next post: