You need to redirect the output of the FTP command. Check for a succesful message and act upon it.
I can't provide an exact script, because it will depend on the FTP command you actually use, but the idea is like this.
echo open Host Name >%temp%ftpin.txt
echo user_name >>%temp%ftpin.txt
echo password >>%temp%ftpin.txt
echo put user_input.csv >>%temp%ftpin.txt
echo bye >>%temp%ftpin.txt
ftp -n -s:%temp%ftpin.txt >%temp%ftpout.txt
for /f "tokens=* skip=9" %%a in (ftpout.txt) do (
if "%%a"=="226 Transfer complete." (
del user_input.csv
)
)
EDIT: You will have to adjust your BAT to the actual output of your FTP script. Probably you will need to change the "skip"
parameter of the FOR
command.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…