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.

one using type command with pipe redirection operator

type NUL > empty1.txt

It creates an empty1.txt file.

Another, using cd command with pipe redirection symbol

cd . > empty2.txt

Third, using call command

call > empty3.txt

The fourth way using the copy command

copy > empty4.txt

The fifth way, using the echo command

echo. > empty5.txt

The sixth way is using notepad in windows

notepad empty6.txt

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.