Link to home
Start Free TrialLog in
Avatar of rksmith
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
Avatar of SteveGTR
SteveGTR
Flag of United States of America image

There isn't any that I know of.
Avatar of dbrunton
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
ASKER CERTIFIED SOLUTION
Avatar of rin1010
rin1010

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rksmith
rksmith

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.
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.