How can I automate FTP file transfer?
Create all the following files in the
userdata/scripts folder
-
Create
myftp.bat with the following contents
cd /d %~dp0
ftp -s:ftp_info.txt ftp.your_server.com
info
NOTE: Replace ftp.your_server.com with your ftp server name
-
Create
ftp_info.txt with the following contents
your_username
your_password
ls
quit
info
Replace your_username and your_password with your username and password.
info
Replace ls with your commands.
-
Create
ftp.sah with the following contents
var $out = _execute(_resolvePath("myftp.bat"), true);
_alert($out);
-
Run
ftp.sah from the Controller or using testrunner.bat.