String Manipulation Error
Posted: 14 Aug 2008 23:23
Hi
Can you please help with the below problem
I am trying to do a string compare but i am getting "The syntax of the command is incorrect"
Thanks in advance
Can you please help with the below problem
I am trying to do a string compare but i am getting "The syntax of the command is incorrect"
Code: Select all
@Echo off
setlocal enabledelayedexpansion
set check=some
set fourchars=
FOR /F "TOKENS=1,2 DELIMS=_." %%a IN ("file_somenamev1.3.zip") do (set token1=%%a&set token2=%%b)
echo token1 %token1%
set fourchars=%token2:~0,4%
echo %fourchars%
if %fourchars% == %check%(
echo found
)
Thanks in advance