Learn how to create an empty file with a DOS command line in windows.
In every directory, different files exist - NUL that is equivalent to /dev/null in UNIX.
There are multiple ways to create an empty file in the Windows command line.
type command with
pipe redirection operator
type NUL > empty1.txt
It creates an empty1.txt file.
cd command with
pipe redirection symbol
cd . > empty2.txt
call > empty3.txt
The fourth way using the
copy > empty4.txt
The fifth way, using the
echo. > empty5.txt
The sixth way is using notepad in windows
It creates empty6.txt and opens the empty file in notepad.
Seven ways are using the break command
break > empty.txt
The above all are commands to create an empty file with zero bytes of size in a windows dos command prompt.