Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a long command line, and I would like to enter it on several lines. Something like the following (if it were possible):

vsdbcmd /a:Deploy /manifest:Database.deploymanifest _
    /p:DeploymentConfigurationFile=Database_Database.sqldeployment _
    /p:SqlCommandVariablesFile=Database_Database.sqlcmdvars _
    /p:TargetDatabase=Database _
    /dd- /cs:"Data Source=production;integrated security=true" _
    /script:DatabaseChanges.sql /dsp:SQL > errors.log 2>&1

Is there a character or sequence of characters that can be used to write a command line on more than one line?

share|improve this question
Out of curiosity, if it's more than one line, and looks as long and as complicated as you specified, why not put it in a bat/cmd file, or better yet, a script (wsh/poweshell)? This would allow you to launch it with one word – Traveling Tech Guy Aug 19 '11 at 2:29
I intend to put it into a script, but will it run if it's on more than one line? – John Saunders Aug 19 '11 at 2:52
That is the point of a script/batchfile – soandos Aug 19 '11 at 2:54
The closest I can see, and it's not for a cmd prompt window but powershell window works for a powershell script too, is… – barlop Aug 19 '11 at 2:57
He clearly wants good formatting, so it's very readable. He asked how to do it in a script in his title too. – barlop Aug 19 '11 at 2:58
up vote 7 down vote accepted

Try using '^' as the continuation character. For example:

echo foo ^
bar ^

results in:

foo bar baz
share|improve this answer
Thanks! That works. I first used DOS back in 1983 and never knew this. Is it documented somewhere? – John Saunders Aug 19 '11 at 15:12
I assume it's documented somewhere but I couldn't tell you where I first saw it. (It also works for escaping '>', '<', and '|'.) – BillP3rd Aug 19 '11 at 15:58
neat! I never knew this existed. – Keltari Aug 20 '11 at 7:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.