rksmith
asked on
Long MS-DOS batch command
I have a batch file with one command in it that is about 200 characters long. To make it easier to read I would like to break it up into multiple lines. What is the "line continuation" character that I can use to make it execute multiple lines as one command?
Thanks
Thanks
There isn't any that I know of.
200 characters won't fit on a command line in DOS.
The best bet is to redirect it from a text file if the command allows. Eg
fancycommand < textfile
The best bet is to redirect it from a text file if the command allows. Eg
fancycommand < textfile
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This .bat file is being called through the Task Scheduler on a Win2K server. It does execute successfully, my question is purely to make it more readable. I will just set word wrap on when viewing the file and call it a day.
Thank you all very much for the help.
Thank you all very much for the help.
On windows 2000 (not sure about other releases) the ^ character works as a line continuation char.
^ also works as the escape char (like \ does on linux)
ex: if you want to echo the | char then you would type "echo ^|" as "echo |" will cause an error.
^ also works as the escape char (like \ does on linux)
ex: if you want to echo the | char then you would type "echo ^|" as "echo |" will cause an error.