Can somebody remember what was the command to create an empty file in MSDOS using BAT file?
echo. 2>EmptyFile.txt
This redirects output stream 2 (stderr
) to a file. The command echo
doesn't output anything to stderr
, so the file becomes empty.
Plain echo
would work too, but echo.
is better because it doesn't print the useless and potentially confusing message ECHO is on.