Unfortunately I have to report another bug in DownloadUpdates.cmd , one that's a little bit annoying because it limits the usefulness of the download.log. This bug is present ever since the output of the download process was extended to include all URLs and file names; don't recall which version and I haven't been able to find the relevant change in the history so far.
Anyway. Currently, the call to the downloader (wget, aria2) is done in a nested for-loop. This is alright, but it creates a problem. Let me illustrate the issue with this short example batch:
- Code: Select all
for /L %%i IN (1,1,10) DO (
echo %RANDOM%
echo %time%
timeout /T 1
)
- Code: Select all
28383
23:19:17,48
Gewartet wird 0 Sekunden. Weiter mit beliebiger Taste...
28383
23:19:17,48
Gewartet wird 0 Sekunden. Weiter mit beliebiger Taste...
28383
23:19:17,48
Gewartet wird 0 Sekunden. Weiter mit beliebiger Taste...
28383
23:19:17,48
Gewartet wird 0 Sekunden. Weiter mit beliebiger Taste...
28383
23:19:17,48
Gewartet wird 0 Sekunden. Weiter mit beliebiger Taste...
28383
23:19:17,48
Gewartet wird 0 Sekunden. Weiter mit beliebiger Taste...
28383
23:19:17,48
Gewartet wird 0 Sekunden. Weiter mit beliebiger Taste...
28383
23:19:17,48
Gewartet wird 0 Sekunden. Weiter mit beliebiger Taste...
28383
23:19:17,48
Gewartet wird 0 Sekunden. Weiter mit beliebiger Taste...
28383
23:19:17,48
Gewartet wird 0 Sekunden. Weiter mit beliebiger Taste...
23:19:27,15
There are at least two solutions to tackle this problem.
- Use delayed expansion, like this (ugly):
- Code: Select all
setlocal EnableDelayedExpansion
for /L %%i IN (1,1,10) DO (
echo !RANDOM!
echo !time!
timeout /T 1
)
endlocal
- Call a label to output the variable contents, like this (not nice either):
- Code: Select all
for /L %%i IN (1,1,10) DO (
call :SECT
timeout /T 1
)
:SECT
echo %time%
goto :EOF
Regards
Dalai