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?
Hi:
How can i do a wildcard search in root drive of my ftp server(it has folders and subfolders) and then copy file to remote server. For example i would like to search for file "full_us_abc*.bak". on the ftp server.And then if found then copy the file to remote server. The user will input the search string and the remote server path.Any helpp will be appreciated.

Roshan
Something like this:
FTP Script
  1. $aStr = GETPARAM(1)
  2. $aPath = GETPARAM(2)
  3. $aTempPath = GETENV("Temp")
  4. OPENHOST("my_ftp_server_ip_or_fqdn")
  5. LOCALCHDIR($aTempPath)
  6. GETFILE($aStr)
  7. OPENHOST("remoteserver_ip_or_fqdn")
  8. CHDIR($aPath)
  9. PUTFILE($aStr)
  10. EXEC('del /Q "'.$aTempPath.'\'.$aStr.'"')
Run as
ScriptFTP.exe script_file.ftp search_string remote_server_path