2013-04-23 44 views
3

这里是我的批处理的一部分:DOS批处理:需要增加新线

start "" "C:\Program Files (x86)\Microsoft Office\Office12\OUTLOOK.EXE" /c ipm.note /m "email address&cc=email address 2;email address 3&subject=Very Important Alert&body=Line 1 of alert\nLine 2 of alert" 

这只是将文字\n进入体内虽然。我如何获得它插入实际换行符?

回答

1

试试这个:

"...&body=Line 1 of alert\r\nLine 2 of alert" 

或者这样:

"...&body=Line 1 of alert%%0D%%0ALine 2 of alert" 
+2

这一个为我工作:'%% 0D %% 0A'。 '\ r \ n'仍然插入文字'\ r \ n'序列。 – 2013-04-23 07:22:25

0

对我下面的工作;然而,我不得不点击发送按钮来完成该过程。

start "" "C:\Program Files (x86)\Microsoft Office\Office12\OUTLOOK.EXE" /c ipm.note /m "FromEmailAddress&cc=EmailAddress1;EmailAddress1&subject=Very Important Alert&body=Line 1 of alert%%0D%%0ALine 2 of alert"