View Full Version : ECHO > without "


Rich Pasco
03-01-2004, 10:55 PM
Is it possible to ECHO a greater-than sign without getting quotes
around the result?

For example,
Echo A>B
puts the letter "A" into a file named "B" which is not what I want, but
Echo "A>B"
diplays the string
"A>B"
complete with the quote marks. I just want to display
A>B
exactlu as shown. Any ideas?

- Rich

Torgeir Bakken (MVP)
03-01-2004, 11:02 PM
Rich Pasco wrote:

> Is it possible to ECHO a greater-than sign without getting quotes
> around the result?
>
> For example,
> Echo A>B
> puts the letter "A" into a file named "B" which is not what I want, but
> Echo "A>B"
> diplays the string
> "A>B"
> complete with the quote marks. I just want to display
> A>B
> exactlu as shown. Any ideas?

Hi

C:\>echo A^>B
A>B


--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide:
http://www.microsoft.com/technet/community/scriptcenter/default.mspx

Torgeir Bakken (MVP)
03-01-2004, 11:02 PM
Rich Pasco wrote:

> Is it possible to ECHO a greater-than sign without getting quotes
> around the result?
>
> For example,
> Echo A>B
> puts the letter "A" into a file named "B" which is not what I want, but
> Echo "A>B"
> diplays the string
> "A>B"
> complete with the quote marks. I just want to display
> A>B
> exactlu as shown. Any ideas?

Hi

C:\>echo A^>B
A>B


--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide:
http://www.microsoft.com/technet/community/scriptcenter/default.mspx

Rich Pasco
03-01-2004, 11:53 PM
Torgeir Bakken (MVP) wrote:

> Rich Pasco wrote:
>
>> Is it possible to ECHO a greater-than sign without getting quotes
>> around the result?
>>
>> For example,
>> Echo A>B
>> puts the letter "A" into a file named "B" which is not what I want, but
>> Echo "A>B"
>> diplays the string
>> "A>B"
>> complete with the quote marks. I just want to display
>> A>B
>> exactlu as shown. Any ideas?
>
> Hi
>
> C:\>echo A^>B
> A>B

Perfect! Thank you very much.

For future reference, other than asking here, how could I have found
this out? Is it documented in the Windows 2000 help files? If so,
where?

- Rich

Rich Pasco
03-01-2004, 11:53 PM
Torgeir Bakken (MVP) wrote:

> Rich Pasco wrote:
>
>> Is it possible to ECHO a greater-than sign without getting quotes
>> around the result?
>>
>> For example,
>> Echo A>B
>> puts the letter "A" into a file named "B" which is not what I want, but
>> Echo "A>B"
>> diplays the string
>> "A>B"
>> complete with the quote marks. I just want to display
>> A>B
>> exactlu as shown. Any ideas?
>
> Hi
>
> C:\>echo A^>B
> A>B

Perfect! Thank you very much.

For future reference, other than asking here, how could I have found
this out? Is it documented in the Windows 2000 help files? If so,
where?

- Rich

Phil Robyn
03-02-2004, 12:47 AM
Rich Pasco wrote:

> Torgeir Bakken (MVP) wrote:
>
>
>>Rich Pasco wrote:
>>
>>
>>>Is it possible to ECHO a greater-than sign without getting quotes
>>>around the result?
>>>
>>>For example,
>>> Echo A>B
>>>puts the letter "A" into a file named "B" which is not what I want, but
>>> Echo "A>B"
>>>diplays the string
>>> "A>B"
>>>complete with the quote marks. I just want to display
>>> A>B
>>>exactlu as shown. Any ideas?
>>
>>Hi
>>
>>C:\>echo A^>B
>>A>B
>
>
> Perfect! Thank you very much.
>
> For future reference, other than asking here, how could I have found
> this out? Is it documented in the Windows 2000 help files? If so,
> where?
>
> - Rich
>

start hh.exe ms-its:%WINDIR%\Help\windows.chm::/ntcmds.htm

click on "What's new or different from MS-DOS"

You will see

^ Escape character. Allows typing command symbols as text.

--
Phil Robyn
Univ. of California, Berkeley

u n z i p m y a d d r e s s t o s e n d e - m a i l

Phil Robyn
03-02-2004, 12:47 AM
Rich Pasco wrote:

> Torgeir Bakken (MVP) wrote:
>
>
>>Rich Pasco wrote:
>>
>>
>>>Is it possible to ECHO a greater-than sign without getting quotes
>>>around the result?
>>>
>>>For example,
>>> Echo A>B
>>>puts the letter "A" into a file named "B" which is not what I want, but
>>> Echo "A>B"
>>>diplays the string
>>> "A>B"
>>>complete with the quote marks. I just want to display
>>> A>B
>>>exactlu as shown. Any ideas?
>>
>>Hi
>>
>>C:\>echo A^>B
>>A>B
>
>
> Perfect! Thank you very much.
>
> For future reference, other than asking here, how could I have found
> this out? Is it documented in the Windows 2000 help files? If so,
> where?
>
> - Rich
>

start hh.exe ms-its:%WINDIR%\Help\windows.chm::/ntcmds.htm

click on "What's new or different from MS-DOS"

You will see

^ Escape character. Allows typing command symbols as text.

--
Phil Robyn
Univ. of California, Berkeley

u n z i p m y a d d r e s s t o s e n d e - m a i l