How can I split long commands over multiple lines in a batch file?
Split long commands in multiple lines through Windows batch file
batch-fileline-continuation
Related Topic
- Windows – How to echo a newline in a batch file
- Windows batch files: .bat vs .cmd
- Windows – How to prevent auto-closing of console after the execution of batch file
- How to split double quoted line into multiple lines in Windows batch file
- Windows – How to run two commands in one line in Windows CMD
- How to “comment-out” (add comment) in a batch/cmd
Best Answer
You can break up long lines with the caret
^
as long as you remember that the caret and the newline following it are completely removed. So, if there should be a space where you're breaking the line, include a space. (More on that below.)Example:
would be written as: