Topic "Help with exclude mask"

Author Message
moabut
[View user's profile]

Joined: 2011-01-31
Posts: 2
Location: Moab Utah USA
First of all I am completely new to scripting. I have been trying to get an exclude of any kind to work and can not. I have read and reread all of the documentation and all of the posts concerning MASKS. I just don't understand how they work. I log onto the donone directory and want to exclude the sub directory /laptop seems a simple thing but....frustration.
I have been trying every combination for a week without any luck. Here is an example:
option batch on
option confirm off
option exclude */;laptop/;
open donone@moab-utah.com
synchronize local -delete
close

Maybe someone could explain to me the reasoning for use of the excludes for directories and files and maybe give me some examples. I truly, truly would appreciate it.
Thanks
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24993
Location: Prague, Czechia
option exclude laptop
Works for me.
The option you have in your example should exclude all subdirectories (because of */).
_________________
Martin Prikryl
moabut
[View user's profile]

Joined: 2011-01-31
Posts: 2
Location: Moab Utah USA
Thanks for your time Martin. I guess I should have investigated further, at least I would have known that the */ worked as in not downloading any of the sub-directories. Here is the scenerio: I already had the complete sync of the donone directory on my HD, then I added the exclude option and thought that with the -delete switch it would delete anything that I excluded from the next synchronize local -delete. However, it did not delete the files in the root or the "*.pdf; *.xls; laptop/" directory. I discovered this after I read your reply and decided to manually delete the excluded files and folder then run the script again and lo and behold, it did in fact exclude them from the download. Am I misunderstanding the function of the -delete switch? Shouldn't it delete any files that are not included in the download from the source that are present in the target?

Thanks again

Don
_________________
Well here's another nice mess I've gotten myself into. "Scripting should be left to the intellegent; and that leaves me out"
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24993
Location: Prague, Czechia
moabut wrote:
Am I misunderstanding the function of the -delete switch? Shouldn't it delete any files that are not included in the download from the source that are present in the target?

Yes you are. It excludes the files/directories from synchronization (including deletion).
_________________
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