I'm writing a *.bat
file (Windows) in which I use FTP commands to get remote files back on a local machine. The remote directory includes a archive
subdirectory in which I want to move the files once they are downloaded on the local machine.
My script in the *.bat
file:
ftp -v -i -s:GET_FILES_FTP.txt
My script in GET_FILES_FTP.txt
:
open example.com
username
password
lcd S:\
lcd repository/files
mget *.txt
rename *.txt archive/
disconnect
bye
Note that hostname, username and password are not those I use for real!
The TXT files are downloaded properly on the local machine.
The problem is that rename *.txt archive/
is not interpreted and the files do not move to the archive
file. I the command window, I get a directory not found
error message. I can't find extra information better than this doc.
Any idea on how to move the files?