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.
Processing reserved charectors in a batch
Moderator: DosItHelp
-
- Expert
- Posts: 391
- Joined: 19 Mar 2009 08:47
- Location: Iowa
-
- Posts: 40
- Joined: 25 Jan 2008 14:05
depending on what ou are doing, sed, grep, awk may be more suited to this. These can be called and controlled from a batch script.
Also, consider storing the data in temp text files rather than in variables.
As mentioned handling these sort of things is a pain in cmd, and often involves terribly ugly hack and workarounds.
Also, consider storing the data in temp text files rather than in variables.
As mentioned handling these sort of things is a pain in cmd, and often involves terribly ugly hack and workarounds.