11

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.

2
  • windows cmd is multiline
    – subanki
    Sep 11 '10 at 14:16
  • Edited my question for clarity Sep 11 '10 at 14:27
12

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

1
  • Can this be used for batch files?
    – Isxek
    Sep 11 '10 at 14:33

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