Hi,
This code:
set sfv=ab,cd
set sfvi=%sfv%
if [%sfvi%]==[] echo pppppppppppppppppp
gives me this response:
C:\business\Batch\Env\envString>set sfv=ab,cd
C:\business\Batch\Env\envString>set sfvi=ab,cd
cd]==[] was unexpected at this time.
C:\business\Batch\Env\envString>if [ab,cd]==[] echo pppppppppppppppppp
. How to escape (,) character to avoid "cd]==[] was unexpected at this time." error message?
Thanks.
ESCAPE Character Problem
Moderator: DosItHelp
Re: ESCAPE Character Problem
The comma is a delimiter (similar to a space character). Use double quotes instead of square brackets.
Regards
aGerman
Code: Select all
set sfv=ab,cd
set sfvi=%sfv%
if "%sfvi%"=="" echo pppppppppppppppppp
Regards
aGerman
Re: ESCAPE Character Problem
Thank you!!! It works.