Topic "Synchronization with excluded remote directories deletes local files"

Author Message
mangrove

Guest


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. Shocked Laughing Instead, the behaviour one would expect is that the ignored directory would be unaffected on the local drive.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
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

Guest


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
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
I have added this to https://winscp.net/eng/docs/file_mask#path

Quote:
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
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