Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

I have added this to https://winscp.net/eng/docs/file_mask#path

The full path mask matches a local or a remote paths only, depending on syntax used. This matters for synchronization particularly, for which you may need to use a separate full path mask for both local and remote path. Or use a partial path mask
mangrove

Yup, this was the problem. (Together with an additional problem of missing trailing backslashes at the local side.)

However, I have read the documentation again and it was -- and still is -- not clear to me that this would happen. May I suggest an additional note in the form of:

"Note that excluding a path on only one side when using the option -delete will trigger a deletion on the other side, due to the deletion logic being applied after the exclusion logic"

Or something similar.
martin

Re: Synchronization with excluded remote directories deletes local files

You have to exclude both the local and the remote directory.

If you exclude by name only, it's automatically applied to both sides.

If you exclude by full path, it's excluded only on the side with the respective path syntax.
mangrove

Synchronization with excluded remote directories deletes local files

When using synchronization local <= remote and file masks to exclude remote directories, the option -delete actually deletes those local directories excluded by the remote mask! That can not be right. :shock: :lol: Instead, the behaviour one would expect is that the ignored directory would be unaffected on the local drive.