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

Re: synchronize remote -delete -filemask=|do-not-sync.txt will delete do-not-sync.txt if it is present.

I've tested this, but I cannot reproduce the behavior you are reporting. For me the file is not deleted.

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, use /log=C:\path\to\winscp.log command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
martin

Re: synchronize remote -delete -filemask=|do-not-sync.txt will delete do-not-sync.txt if it is present.

Thanks for your post. I'll look in to it and I'll let you know.
hedgehog90

synchronize remote -delete -filemask=|do-not-sync.txt will delete do-not-sync.txt if it is present.

I've written a script to upload the latest changes to my website.
The script runs a winscp command like this:
synchronize remote -delete -filemask=|do-not-sync.txt

This results in do-not-sync.txt being deleted on the server but that is not what I want.
When I remove a file locally I want it removed from the server on being updated, so I need the -delete argument.
However there are files I don't want synchronized, but I don't want deleted either.
It looks like if the file doesn't match the specified filemask, it's not only ignored but also considered for deletion.
How do I make it so the list of negated files (with the | prefix) in filemask are NOT deleted on the server when I run synchronize remote -delete?