Posted: 2015-02-09 21:26
Trying to use synchronize to retrieve unique files from an ftp site, and then delete the file from the remote site. The unique file is retrieved, but not deleted. Also files in a subdirectory are retrieved as well as the directory structure.
option echo on
option batch on
option confirm off
option transfer binary
open sftp://DPS_Oxford:email@example.com -privatekey=D:\Spool\VBControl\Policy_FTP\DPS_xxxxxx.ppk
synchronize local P:\PolicyAssemblyAnnuity\AnnuityTrackingArchive -filemask="/OX1000_POLICY_PRINTING_WITH_CERTIFIED_MAILING\*.csv" -Delete
sCmd = """C:\Program Files\WinSCP\WinSCP.com"" -script=" & sFTPTempFile & " /log=P:\PolicyAssemblyAnnuity\AnnuityTrackingArchive\Script.log"
Location: Prague, Czechia
If you want to download a file and remove the original, use
You can post new topics in this forum
And it's free!