Posted: 2016-08-19 08:28
I've started setting up the automation of picking up files off of the FTP Host, and all of this is working as intended thus far.
The next step I need to achieve, and I'm not sure if its possible or not is to move the source file on the FTP Host to another directory on that FTP host once it has been copied without changing the name of the file on the host server.
The script I am currently using, does not seem to work. Some guidance please?
if %ERRORLEVEL% neq 0 goto error
echo Download succeeded, moving local files
move *.csv /downloads/MySQL/downloaded
exit /b 0
echo Upload failed, keeping local files
exit /b 1
My dailyimport.txt looks like this:
# Change remote directory
# Force binary mode transfer
option transfer binary
# Download file to the local directory
get filename001_*.csv "E:\Data\DailyImports\newfilename001.csv"
get filename002_*.csv "E:\Data\DailyImports\newfilename002.csv"
get filename003_*.csv "E:\Data\DailyImports\newfilename003.csv"
mv *.csv cd /downloads/MySQL/downloads/*.csv
# Exit WinSCP
Location: Prague, Czechia
You can post new topics in this forum
And it's free!