I want to use loop variables in windows cmd. However, the values showing are not correct.
I tried to add quotes/remove quotes, although the results are different, all of them are not working.
for /l %%c in (100, -10, 0) do (
SET "a=0"
SET "delim=-"
SET "repname=%a%%delim%%%c"
ECHO %repname%
REM "C:\Program Files\Aimsun\Aimsun Next 8.3\Aimsun Next.exe" -script consoleScript.py "..\networks\microSDKtestNetwork.ang" %repname% -dontlookformissing
)
Expect repname to be "0-100", "0-90"..."0-0". However, the result is:
D:\Codes\aimsun_sdks_imove\scripts>(
SET "a=0"
SET "delim=-"
SET "repname=20"
ECHO
REM "C:\Program Files\Aimsun\Aimsun Next 8.3\Aimsun Next.exe" -script consoleScript.py "..\networks\microSDKtestNetwork.ang" -dontlookformissing
)
ECHO is on.