How do I do single command line command on multiple lines in windows?

8

Is there a way to extend a command line command on to multiple lines in windows?

Of course, one can simply keep typing, and wrap around, what I'm wondering is if there is a character that you could put at the end of the line that would be a signal that the command is not yet complete. This could be helpful in formatting a large command, and I've seen this in other command line environments.

Eric Wilson

Posted 2010-09-11T14:12:50.917

Reputation: 6 388

Question was closed 2018-10-23T07:15:02.963

windows cmd is multiline – subanki – 2010-09-11T14:16:26.880

Edited my question for clarity – Eric Wilson – 2010-09-11T14:27:49.610

Answers

10

You can use the carat ^ to extend to the next line. For instance:

cd\^
program files\^
foo_directory

Will get parsed as:

cd\program files\foo_directory

JNK

Posted 2010-09-11T14:12:50.917

Reputation: 7 642

Can this be used for batch files? – Isxek – 2010-09-11T14:33:40.117