Sometimes the quickest way to accomplish something in Windows is with a simple batch file. The best example would be when you want to run a command and append the contents of it to a text file for later perusal. Occasionally, I’ve had a desire to run multiple commands and append them to the same file, but I like to separate the output from the various commands by some whitespace to make it easier to look at later. I’ve always just echo’d some arbitrary character to the file to cause blank lines to show up, like this: echo _ >> somefile.txt
I realized today that there’s actually an easy way to simply echo a carriage return or line feed instead, by just issuing an echo command followed immediately by a period (no space in between), like this:
echo. >> somefile.txt
Thought I’d share it with the rest of you who didn’t know this already.
Other articles you might find useful: