Computer Hope
Microsoft => Microsoft DOS => Topic started by: gregory on February 27, 2009, 03:39:59 AM
-
For example:
set var=value7
if "%var%"=="value*" (echo yes) else (echo no)
This will produce a 'no', seems the == is taken absolutely with no support for wildcards. Any ideas how to make this process work?
Thanks.
-
do a string slice: i.e. check if the first 5 chars of the variable are equal to "value"
if "%variable:~0,5%"=="value" whatever
-
Surely, I should have thought of that. Thank You. ;)