このスクリプトの何が問題になっていますか?
@echo off
SETLOCAL ENABLEEXTENSIONS
SETLOCAL ENABLEDELAYEDEXPANSION
set /P start= Input start : %=%
set /P end= Input End : %=%
for /l %%i IN (%start%,1,%end%) DO (
set num=0%%i
set num=!num:~-2!
echo wget "http://portal/excel!num!.xls"
)
pause
の場合Input start = 01
、Input End = 06
正常に動作し、Excel ファイルがダウンロードされます。結果 :
Input start : 01
Input End : 12
wget "http://portal/excel01.xls"
wget "http://portal/excel02.xls"
wget "http://portal/excel03.xls"
wget "http://portal/excel04.xls"
wget "http://portal/excel05.xls"
wget "http://portal/excel06.xls"
wget "http://portal/excel07.xls"
wget "http://portal/excel08.xls"
wget "http://portal/excel09.xls"
wget "http://portal/excel10.xls"
Press any key to continue . . .
しかし、場合Input start = 01
、Input End = 08
または場合Input start = 01
、、Input End = 09
正常に動作せず、Excel ファイルがダウンロードされません。結果 :
Input start : 01
Input End : 08
Press any key to continue . . .
誰でも説明できますか?