views:

50

answers:

2

How can I embed a CR + LF in a command I'm using at the Windows command prompt without actually issuing the command?

Example:

C:\Windows\system32>myprog -u user -p pass -text "Sincerely,\nRob"

Is it up to myprog to do handle the line break? I figured there must be some way to represent a line break that the Windows command line would recognize.

A: 

From what i can understand, it is upon your program to decipher the input that it receives (i.e., how to treat the data from the stream). Usually a carriage return/line feed is taken as separators.

Cypher
+1  A: 

you might be able to pass the ascii numbers 13 and 10. in the windows world a 'new line' is actually \r\n (carriage return and newline) so you'll need them both passed.

Keng