I would like to know if there is a function like to preserve the text formating (like spaces, line breaks) cause I am creating a .bat file the create another .bat file accordingly.
Now if I want to output text to create the 2nd .bat file I would echo 1 line at a time.
@ECHO OFF
SET file=output.bat
ECHO @ECHO OFF > %file%
ECHO ECHO HELLO >> %file%
ECHO PAUSE >> %file%
Pause
The method above is really inefficient so I would like to output it all at once.
So can I output the text like this?
ECHO "@ECHO OFF
ECHO HELLO
PAUSE">%file%
Thanks!