Topic "Excluding files and directories not working for me"

Author Message
Spring

Guest


Hi!

I'm using the newest version of WinSCP and I'm trying to exclude a couple of directories from syncing but I can not get it working. I've set the following excludes:

Excluding files:
./application/exports/*
./application/logs/*
./public/images/products/*
./public/uploads/*
.\application\exports\*
.\application\logs\*
.\public\images/products\*
.\public\uploads\*

Excluding directories:
./application/exports
./application/logs
./public/images/products
./public/uploads
.\application\exports
.\application\logs
.\public\images\products
.\public\uploads

But after all those rules it's still trying to transfer those files (see attachment). Anybody who has an idea what I'm doing wrong?
winscp_1.png (211.57 KB) [Download]

Description: (none)

Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
WinSCP does not support masks with relative paths. The path has to be absolute or masked (e.g. with leading *, i.e. */application/exports).
See https://winscp.net/eng/docs/file_mask#path_mask
Spring

Guest


Thanks. I'll give it a try!
Spring

Guest


Yep, works. Thanks for the help!
Radek

Guest


Hi,
I'm add this:
*/media/zoo
*/components/com_zoo
*/my-edit

to include masks. But when I sync, synced only my-edit folder. Can you help me? What I do wrong? Thank you.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Radek wrote:
I'm add this:
*/media/zoo
*/components/com_zoo
*/my-edit

to include masks. But when I sync, synced only my-edit folder. Can you help me? What I do wrong? Thank you.

Because the media and components are not on the include list, so WinSCP never gets to zoo or com_zoo.
_________________
Martin Prikryl
Guest




prikryl wrote:
Radek wrote:
I'm add this:
*/media/zoo
*/components/com_zoo
*/my-edit

to include masks. But when I sync, synced only my-edit folder. Can you help me? What I do wrong? Thank you.

Because the media and components are not on the include list, so WinSCP never gets to zoo or com_zoo.


Thank you, but what I must do, to include only this */components/com_zoo folder? When I add */components, then comparisons all subfolders.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Quote:
When I add */components, then comparisons all subfolders.

That's correct. You have to exclude the subfolders you do not want to transfer.
_________________
Martin Prikryl
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