Write & letter in a textfile via batch

November 13, 2010 at 01:43:06
Specs: Windows XP, 2gb
I have a batch file. I want to add a "&" letter in myfile.txt via this batch. Example:
I wanna write 'a & b' in a textfile.
But it is not happening.. Everything writes but "&" letter is not visible..
Have any idea?
Sorry for my bad English

See More: Write & letter in a textfile via batch

Report •


#1
November 13, 2010 at 02:10:53
Try

@echo a ^& b >> MyFile.txt

Regards,

Happy is ONE who says I am an OttoMAN.


Report •

#2
November 13, 2010 at 02:12:09
For any character with "special meaning" you need to "escape" the char. Means to take it literally.

echo a ^& B >> myfile

Other special chars are:

< > | ! %

and maybe others.


=====================================
Life is too important to be taken seriously.

M2


Report •

#3
November 13, 2010 at 02:13:19
oops

gotta type faster


=====================================
Life is too important to be taken seriously.

M2


Report •

Related Solutions


Ask Question