How to include a subfolder from an excluded folder

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
tessier
New Member
New Member
Posts: 1
Joined: 2022-11-03, 07:55 UTC

How to include a subfolder from an excluded folder

Post by *tessier »

In Synchronize Dirs I excluded a folder called ".profile".

Code: Select all

*.* | .git\ .profile\
But now I need to sync ".profile/themes/" folder. How to include a subfolder from previously excluded folder?
User avatar
white
Power Member
Power Member
Posts: 4594
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: How to include a subfolder from an excluded folder

Post by *white »

Do you mean how to search for files/folders within ".profile/themes/" folders?

You cannot use include folders for that, see https://www.ghisler.ch/board/viewtopic.php?p=420350#p420350

So you need to search in another way. For example by using the plugin tab and create a condition for tc.path (inefficient). Searching using Everything is probably also possible.
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: How to include a subfolder from an excluded folder

Post by *Dalai »

Well, Total Commander's Synchronize Directories feature is not like rsync. And here it really shows. Note that excluding directories excludes them everywhere in the directory tree that's being compared.

The only way I can think of is to synchronize the .profile/themes directory some other way, e.g. by creating another synchronization profile in TC just for this directory. Or by using another tool to do the synchronization of this directory.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: How to include a subfolder from an excluded folder

Post by *ghisler(Author) »

Note that excluding directories excludes them everywhere in the directory tree that's being compared.
It depends on the syntax:
*.* | .profile\ excludes .profile everywhere.
*.* | \.profile\ excludes .profile only in the base directory of the sync operation (not necessarily in the drive root!).
*.* | \subfolder\.profile\ excludes .profile only in "subfolder".

And indeed you can't exclude .profile and include a subfolder of it, because excluding a folder means skipping it as a whole.
What you can do is exclude all FILES in .profile but still keep the subfolders:
*.* | .profile\*.*
Author of Total Commander
https://www.ghisler.com
Post Reply