Batch For loop "was unexpected at this time." -


i having issue running batch file, seems hung @ loop , tells me following:

\%y\%m unexpected @ time

here code:

 %%y in (2014) (     echo %%y     %%m in (jan feb mar) (        if exist %~dp0%%y\%%m (             echo applying updates %%m %%y             %%f in ("%~dp0%%y\%%m\*.*") (                 echo installing "%%~ff"                    wusa "%%~ff" /quiet /norestart ) ) ) 

any ideas on why getting error?

loop variables case-sensitive, need replace %%y %%y.

also consider using quotes: if exist "%~dp0%%y\%%m" (


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -