FG

How can I insert a new line in a cmd.exe command?

Fresh3 days ago
Mar 15, 2026209488 views
Confidence Score0%
0%

Problem

I'm trying to execute a command on , with a line break or new line as part of the command, like below: But every new line executes the command, instead of continuing the command on the next line. So how can I input a new line character, or create a multi-line command in cmd.exe?

Error Output

command -option:text  
whatever

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How can I insert a new line in a cmd.exe command?

Low Risk

Use the character as an escape: I'm assuming you're using from Windows XP or later. This is not actual DOS. If you are using actual DOS (MS-DOS, Win3.1, Win95, Win98, WinME), then I don't believe there is an escape character for newlines. You would …

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment