Batch For loop "was unexpected at this time." -
i having issue running batch file, seems hung @ loop , tells me following:
\%y\%munexpected @ 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
Post a Comment