I have an FTP Script with the following command
FTP -v -i -s: ftpscr.txt
The text file ftpscr.txt contains the following:
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
When i execute the file http://ftp.bat which contains the ftp script the command prompt keeps on repeating with no results… Please help
You have to rename the http://ftp.bat to myftp.bat
and your ftp command has an errournous space after the -s argument