How to speed up file Synchronization using SCRIPT? Any option to enable multi-thread or multi-files?

Advertisement

johnqle
Joined:
Posts:
1
Location:
SoCal

How to speed up file Synchronization using SCRIPT? Any option to enable multi-thread or multi-files?

I can synchronize a remote folder to my local folder using a batch script just fine but it's very slow because only one file at a time, especially if the top folder have many sub-folders beneath.

Example:
synchronize local -criteria=either -preservetime -transfer=binary -resumesupport=on c:\local /remote/topfolder
Is there any way to speed up the file synchronization process using SCRIPT?
Any options to enable multi-thread or multi-files for example?

Thanks a bunch...
~John

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,605
Location:
Prague, Czechia

Re: How to speed up file Synchronization using SCRIPT? Any option to enable multi-thread or multi-files?

The scripting does not support use of parallel connections.
It should be possible to script it in your favorite language, with use of WinSCP .NET assembly though.
Use Session.CompareDirectories to find all differences.
And then you can call ComparisonDifference.Resolve of individual differences from multiple threads/connections.
Here is an example of use of these methods (from one thread only) in a PowerShell script:
Keep local directory up to date (download changed files from remote SFTP/FTP server)
Here is an example of parallel connections in PowerShell:
Automating transfers or synchronization in parallel connections over SFTP/FTP protocol
It should be easy to merge these two codes to achieve what you want.

Reply with quote

Advertisement

You can post new topics in this forum