FTP scripts in combination with batch scripts under Windows

FTP scripts in combination with batch scripts under Windows

Under Windows it is possible to use the integrated FTP client for uploading or downloading files. For this purpose, such an FTP script can be called directly within a batch script. This looks then e.g. like this:

cd\
C:
cd script
ftp -s:practicalftpscript.ftp

Within the FTP script all necessary data must be stored. This includes the login to the server and which actions should be executed:

open ftp.example.com
user
password
bin
get serverdata.csv
put clientdata.csv
delete serverdata.csv
by

get downloads a file, while put uploads a file and delete deletes the corresponding file on the FTP server.

Leave a Reply

Your email address will not be published. Required fields are marked *