Download files similar to GUI in command line

Advertisement

pb_bmays
Joined:
Posts:
1

Download files similar to GUI in command line

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

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum