How to use newline character in text in cmd batch?

How about using the -F parameter to get the log message from a file?

Then, you could do this (untested):

ECHO Commit by: firstuser>SvnLog.txt
ECHO Bug track: 9283>>SvnLog.txt

SVN COMMIT -F SvnLog.txt

I found the answer over at Serverfault:

svn ci -m $'This is the first line\nThis is the second line'

Apparently it's a shell-problem.


I had the same problem and while Claes Mogren's answer does not work with cmd.exe it made me think if there's a shell on Windows that could do that.
And of course there is... PowerShell.

Using PowerShell shell you can achieve this using following command:

svn ci -m "reference to Ninject fixed`nsome ignores added"

Notice the combination of backqoute and n in the message

`n

Tags:

Svn

Batch File