Processing reserved charectors in a batch
Posted: 11 Jan 2010 13:14
Hello,
I am parsing a file containing html tags. At issue is the greater than and less than symbols (<>) . A for-do loop reads these lines in fine. The problems occur when I attempt to set another variable to equal the variable containing these symbols or echoing the variable to screen or a file. The error returned is "< was unexpected at this time." I have tried enabledelayedexpansion and enclosed the variables in double quotes but I can't lick this problem short of preceding each < and > with the ^ character.
Anybody have any suggestions?
Thanks
Steve T.
I am parsing a file containing html tags. At issue is the greater than and less than symbols (<>) . A for-do loop reads these lines in fine. The problems occur when I attempt to set another variable to equal the variable containing these symbols or echoing the variable to screen or a file. The error returned is "< was unexpected at this time." I have tried enabledelayedexpansion and enclosed the variables in double quotes but I can't lick this problem short of preceding each < and > with the ^ character.
Anybody have any suggestions?
Thanks
Steve T.