Synchronize and then make a copy of files synchronized

Advertisement

cgaleano
Joined:
Posts:
1

Synchronize and then make a copy of files synchronized

Hi,
I have a script that connect to a ftp server and then synchronize the local folder with the remote folder, that works fine, then i need to that files synchronized(only new files) copy to another folder on the remote(ftp server)
This is the script to synchronize, small but efficient.
open ftps://user:password@xx.xx.xx.xx:port/ -certificate="00:00:11:22:33:11:22:33:44:55:55:00:00:00:00:00:00:00:00:00"
synchronize remote c:\folder /folder
I have try move, but that move all the files not only the synchronized.

How can i do that? it there is a way.

Thanks

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: Synchronize and then make a copy of files synchronized

It's not possible (or hard to implement) in simple scripting.
Though, would it work, if you run synchronize second time against the other folder?

Or, you can use .NET assembly. Call Session.SynchronizeDirectories.
And then iterate returned SynchronizationResult.Uploads, uploading each synchronized file to the other folder.

See these articles that cover similar tasks:
https://winscp.net/eng/docs/script_local_move_after_successful_upload
https://winscp.net/eng/docs/library_example_delete_after_successful_download

Reply with quote

Advertisement

You can post new topics in this forum