Topic "Exclude directories from download"

Author Message
doschtinator
[View user's profile]

Joined: 2014-10-23
Posts: 1
Hallo,

I'm using this script for downloading files:

Code:

# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect using a password
# open user:password@example.com
# 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
close
# Exit WinSCP
exit


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
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
Syntax is like:

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

See
http://winscp.net/eng/docs/scriptcommand_get
http://winscp.net/eng/docs/file_mask
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