minime28
Tuesday, March 02, 2010
Symbols in batch files
'>' and '<' are special characters in command prompt. They means input and output redirect. So they can't be directly echoed in command prompt. You need to escape them with '^'.
C:\>echo <
The syntax of the command is incorrect.
C:\>echo ^<
<
This is mentioned in http://www.microsoft.com/windowsxp/home/using/productdoc/en/default.asp?url=/windowsxp/home/using/productdoc/en/ntcmds_shelloverview.asp
The following characters are special and have to be escaped:
<, >, |, &, or ^,
Labels: tech
posted by 桔梗, 11:18 AM