Exclude Directories

Advertisement

noftpanymore
Donor
Joined:
Posts:
28
Location:
Germany

Exclude Directories

Sorry if this is just me being too stupid, but for the life of me I am not able to exclude specific subdirectories from synchronizing. I managed to exclude several top level dirs, but now want to exclude the folder 'cache' with all files in it as well as all its subdirectories. Cache itself is a subdirectory of 'website', so the mask should include

;website/cache/

It does, it looks ok, but it doesn't do anything, means all files and folders found in 'cache' are still synced.

I tried website/cache, website/cache/* and so on, no effect at all.

Help!

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,431
Location:
Prague, Czechia

Re: Exclude Directories

See https://winscp.net/eng/docs/file_mask#directory

Important point is:
The path mask is matched against full path, i.e. not against path relative path to a root of file transfer or synchronization

So either use just the directory name cache/ (what excludes all cache directories anywhere).
Or use a mask that matches a full path, i.e. /home/user/website/cache/ or */website/cache/.

Reply with quote

noftpanymore
Donor
Joined:
Posts:
28
Location:
Germany

That worked, thanks a lot!

It might be useful to add this important information to the help in that specific dialog.

One more question: is it possible to exclude links from synchronization? My server runs on Linux, my computer on Windows, so I have all links found on the server manually added (via mk link /d) to my local copy. That works, but everytime I sync WinSCP stumbles over the links as it cannot handle (or translate) them correctly. I don't expect it to do that, but it should be possible then to exclude those links somehow.

Or should I add them as files into the file exclude mask?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,431
Location:
Prague, Czechia

noftpanymore wrote:

It might be useful to add this important information to the help in that specific dialog.
The article on file masks in linked from
https://winscp.net/eng/docs/ui_editmask
I have just added one more explicit link.

One more question: is it possible to exclude links from synchronization? My server runs on Linux, my computer on Windows, so I have all links found on the server manually added (via mk link /d) to my local copy. That works, but everytime I sync WinSCP stumbles over the links as it cannot handle (or translate) them correctly. I don't expect it to do that, but it should be possible then to exclude those links somehow.
Can you please elaborate on the "stumble"?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,431
Location:
Prague, Czechia

Please attach a full log file showing the problem on a very small set of files/links (using the latest version of WinSCP).

To generate log file, enable logging, log in to your server and do the operation and only the operation that causes the error. 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.

Reply with quote

Advertisement

You can post new topics in this forum