Help with exclude mask

Advertisement

moabut
Joined:
Posts:
2
Location:
Moab Utah USA

Help with exclude mask

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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,227
Location:
Prague, Czechia

Re: Help with exclude mask

option exclude laptop
Works for me.
The option you have in your example should exclude all subdirectories (because of */).
_________________
Martin Prikryl

Reply with quote

moabut
Joined:
Posts:
2
Location:
Moab Utah USA

Re: Help with exclude mask

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"

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,227
Location:
Prague, Czechia

Re: Help with exclude mask

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

Reply with quote

Advertisement

You can post new topics in this forum