I need to write a batch file that will check if a variable contains specific value. I tried to do the following:
If "%%a"=="%%a:%pattern%" (
echo Yes
) else (
echo No
)
input example: %%a="bob binson" %patern%="binson"
I never get Yes printed! can anyone please tell what i missed or give an example of how (s)he would do it?
Thanks in Advance
Substring operations are not available in
for
replaceable parameters. You need to assign the data to a variable and then execute the operation on this variable