我有一个带有以下命令的 FTP 脚本
FTP -v -i -s: ftpscr.txt
文本文件 ftpscr.txt 包含以下内容:
open 10.195.8.165
ftp-user
ftpuser
cd reports/APSummary
@echo off
setlocal
for /f "tokens=2-7 delims=_.-" %%A in ('dir /B TACO_*') do (
setlocal enabledelayedexpansion
call :getmonth %%B
ren TACO*_*%%A-%%B-%%C*_*%%D-%%E-%%F_UTC.csv TACO_%%A!mon!%%C_%%D%%E%%F.csv
endlocal
)
:getmonth
if "%1" equ "Jan" set mon=01
if "%1" equ "Feb" set mon=02
if "%1" equ "Mar" set mon=03
if "%1" equ "Apr" set mon=04
if "%1" equ "May" set mon=05
if "%1" equ "Jun" set mon=06
if "%1" equ "Jul" set mon=07
if "%1" equ "Aug" set mon=08
if "%1" equ "Sep" set mon=09
if "%1" equ "Oct" set mon=10
if "%1" equ "Nov" set mon=11
if "%1" equ "Dec" set mon=12
goto :eof
endlocal
当我执行包含 ftp 脚本的文件 ftp.bat 时,命令提示符不断重复,没有结果...请帮助