Note. Although my original answer drew a few turns, I decided that I could do much better. You can find my original (simplified and erroneous) answer in the editing history.
If Microsoft intended to provide means for outputting an empty string from cmd.exe , Microsoft would probably document such a simple operation. It was this omission that prompted me to ask this question.
So, since the tool for outputting an empty line from cmd.exe not documented, you should probably consider any suggestion on how to do this hacking. This means that there is no known method for outputting an empty string from cmd.exe , which is guaranteed to work (or works efficiently) in all situations.
With this in mind, the method recommended for outputting an empty line from cmd.exe is discussed here. All recommendations are based on changes to the echo command.
echo.
Although this will work in many, if not most situations, it should be avoided because it is slower than its alternatives and may actually fail (see here , here , and here ). In particular, cmd.exe first looks for a file called echo and tries to run it. If a file named echo , echo. exists in the current working directory echo. will fail with an error:
'echo.' is not recognized as an internal or external command, operable program or batch file.
echo: echo\
At the end of this answer, the author claims that these commands can be slow, for example, if they are executed from a network drive location. A specific reason for the potential slowness is not indicated. But we can conclude that it may have something to do with access to the file system. (Perhaps because : and \ have special meaning in the Windows file system path?)
However, some of them may consider them safe, because : and \ cannot be displayed in the file name. For one reason or another echo: recommended for SS64.com here .
echo( echo+ echo, echo/ echo; echo= echo[ echo]
This lengthy discussion includes what I consider all of this. Some of these options are recommended in this SO answer . In the discussion above, this post ends up being presented as a recommendation for echo( and echo:
My question at the top of this page does not indicate the version of Windows. My experiments in Windows 10 show that they all create an empty string, regardless of whether the files with the names echo , echo+ , echo, ..., echo] exist in the current working directory. (Note that my question precedes the release of Windows 10. Therefore, I assume that older versions of Windows may behave differently.)
In this answer, @jeb claims that echo( always works. For me, the @jeb answer implies that other options are less reliable, but does not give any details on why this might be. Please note that @jeb contributed very valuable content to the other links that I provided in this answer.
Conclusion: Do not use echo. . Of the many other options that I came across in the sources that I cited, the support of these two looks the most authoritative:
echo( echo:
But I did not find convincing evidence that the use of any of them will always be trouble-free.
Usage example
@echo off echo Here is the first line. echo( echo There is a blank line above this line.
Expected Result:
Here is the first line. There is a blank line above this line.