ftp automation

ScriptFTP

The professional tool to automate FTP, SFTP, FTPS and schedule FTP batch jobs

The forum is now read only. Please, go to the the main ScriptFTP website if you need help.
Need help writing a script? Have any question about ScriptFTP?
Need to schedule a download that grabs the most current file in the directory.

Thank you
I think there is no way to do so, sorry. I will add this to the issues list.
This is a good idea. I hope it can be implemented at some point.
FTP Script
  1. SILENT(ON)
  2. OPENHOST(server, user, password)
  3. CHDIR('RemoteDIR')
  4.  
  5. $param = GETPARAM(3)
  6. IF($param != '')
  7.   $file = TEXTCUT($param, 20, -1)
  8.   GETFILE($file)
  9.   EXIT
  10.  
  11. GETLIST($list, REMOTE_FILES)
  12.  
  13. $tempfolder = GETENV("temp")
  14. $tempfile1 = $tempfolder.'\1.txt'
  15. $tempfile2 = $tempfolder.'\2.txt'
  16. EXEC ('del /Q /F '.$tempfile1)
  17.  
  18. FOREACH $item IN $list
  19.   $time = GETFILETIME(REMOTE, $item)
  20.  
  21.   EXEC ('echo '.$time.$item.'>>'.$tempfile1)
  22.  
  23.  
  24. EXEC ('sort /r '.$tempfile1.' /o '.$tempfile2)
  25. EXEC ('for /f "tokens=*" %x in ('.$tempfile2.') do ("'.GETPARAM(1).'" "'.GETPARAM(2).'" "%x" && exit /b)')