Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

@itppftp: That thread is about GUI, while this thread is about .NET assembly – unrelated.
martin

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.
johnqle

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