Logical operators are used to compute boolean expressions in batch programming.
In every directory, there are different files exists - NUL which is equavalent to /dev/nul in unix.
There are multiple ways to create an empty file in Windows command line
one using type
command with pipe redirection
operator
type NUL > empty1.txt
This creates an empty1.txt file
Another, using cd
command with pipe redirection
symbol
cd . > empty2.txt
Third, using call
command
call > empty3.txt
fourth ways using copy
command
copy > empty4.txt
Fifth way, using echo
command
echo . > empty5.txt
Sixth way is using notepad in windows
notepad empty6.txt
This creates empty6.txt and opens empty file in notepad
Seven ways is using break command
break > empty.txt
The above all are commands to create a empty file with zero bytes of size in windows dos command prompt The above all are commands to create a empty file with zero bytes of size in windows dos command prompt