Topic "Exclude directories from download"

Author Message
[View user's profile]

Joined: 2014-10-23
Posts: 1

I'm using this script for downloading files:

# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect using a password
# open
# Connect
open user:password@server
# Force binary mode transfer
option transfer binary
# Download file to the local directory D:\dbwp_backup\dateien\
get *.* D:\dbwp_backup\dateien\
# Disconnect
# Exit WinSCP

So this works fine, but now i want to use this script on another webserver and there i want to exclude some directories because of huge file size i don't want to download them.
I searched and read in the internet and this forum, but didn't understand how i have to insert another code line or change it to work correctly.

If anyone answers, please don't link me to another page or tell me to read in the FAQs: I don't understand it!
There are a few folders i want to exclude. Maybe someone can complete my code.

Thanks a lot!

Greets Peter
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27059
Location: Prague, Czechia
Syntax is like:

get -filemask="|/path/to/exclude1;/path/to/exclude2;" *.* D:\dbwp_backup\dateien\


You can post new topics in this forum


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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License