Topic "Download files similar to GUI in command line"

Author Message
pb_bmays
[View user's profile]

Joined: 2015-09-28
Posts: 1
I have a working script to download over 300 files on a nightly basis. It is taking over 6 hours to download the files because it is doing it one at a time. Is there any way to perform the download similar to the GUI where I can create multiple download threads using the WinSCP commands? In the GUI, I told the app to transfer in the background individually with a max thread count of 3.

Here is my current script with the SFTP info "X"d out.

# Automatically continue script on errors
option batch continue

# Disable overwrite confirmations that conflict with the previous
option confirm off

# Connect using a password
# open sftp://user:password@example.com -hostkey="ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
# Connect
open sftp://XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

# Force binary mode transfer
option transfer binary

# Download file to the local directory
get -resume -resumesupport=on *.zip Z:\*.zip

# Disconnect
close

# Exit WinSCP
exit
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
No, the scripting does not support parallel transfers.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
I have added an example how to implement this in PowerShell using WinSCP .NET assembly:
https://winscp.net/eng/docs/library_example_parallel_transfers
squa89_

Guest


prikryl wrote:
I have added an example how to implement this in PowerShell using WinSCP .NET assembly:
https://winscp.net/eng/docs/library_example_parallel_transfers


That link doesn't seem to be working- can you double check?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Oh, sorry, corrected.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License