1.

Solve : empty file?

Answer»

How do i create a new empty file in DOS?
The equivalent of touch in Unix?

ThanksAt the DOS prompt type copy con yourfilename.txt
Pres ctrl+z
DOS should respond with something like "1 file COPIED"
The file will be placed in the current directory.Well ACTUALLY i was hoping for something more automatic that I could use in a batch file. SUGGESTIONS?

Thankscopy nul yourfilename.txt
you dont need the ^Z

GrahamQuote from: SHAMMER on August 07, 2007, 10:03:02 AM

Well actually i was hoping for something more automatic that I could use in a batch file. Suggestions?


See this thread.

Quote
cd\>filename

Works for me...echo. > filenameThat won't MAKE a blank file, that will make a file with a blank line in it.

either:

type nul>filename
OR
cd\>filename

create zero-byte files.


Discussion

No Comment Found