How can I automate FTP file transfer?

Create all the following files in the userdata/scripts folder

  1. 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
  2. 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.
  3. Create ftp.sah with the following contents
    var $out = _execute(_resolvePath("myftp.bat"), true);
    _alert($out);
  4. Run ftp.sah from the Controller or using testrunner.bat.