I think the behavior is not intuitive and not consistent. I made a suggestion to improve it here:
https://www.ghisler.ch/board/viewtopic.php?t=77493
Moderators: Hacker, petermad, Stefan2, white
I think the behavior is not intuitive and not consistent. I made a suggestion to improve it here:
ghisler(Author) wrote: 2022-09-01, 08:01 UTCThe reason is simple: TC starts the search at the "Search in" directory. When you have specified directories in which it should search, it will check whether any of the directories in "Search in" match, and if yes, search in them. This works when you specify subdir1\, but will not work when you specify subdir1\subdir2\, because subdir1 was not searched. Therefore subdir2 is never encountered and will not be searched either.Yes, this is what I am confused, "subdir1\ *.bar" does work, but "subdir1\subdir2\ *.bar" doesn't work.
However, when you EXCLUDE subdir1\subdir2\ via something like
*.* | subdir1\subdir2\
then you did not put any rules where TC is allowed to search, just where it isn't allowed. So when it goes through the directories in the "Search in" directory, it sees that subdir1 isn't forbidden, and searches in it. Then inside of subdir1 it sees that subdir2 is forbidden, and doesn't search there.
And it mentions subdir1\subdir2\ for both inclusion and exclusion.To include/exclude certain directories in the search, wildcards can be used in include/exclude directory names, and the names must have a trailing backslash \ . Directories can be found anywhere, or relative to the search start directory:
1. Relative to the search start directory: \subdir1\ or \subdir1\subdir2\ or \
2. Relative to any subdirectory: subdir1\ or subdir1\subdir2\ (no backslash at the start)
It is a little tough to explain for inclusion since both \subdir1\ and subdir1\ only works for 1st level.To include/exclude certain directories in the search, wildcards can be used in include/exclude directory names, and the names must have a trailing backslash \ . Directories can be found anywhere, or relative to the search start directory:
1. Relative to the search start directory: \subdir1\ (include/exclude) or \subdir1\subdir2\ (only exclusion) or \
2. Relative to any subdirectory (no backslash at the start): subdir1\ (exclusion and 1st level for inclusion) or subdir1\subdir2\ (only exclusion)
To include certain directories in the search, wildcards can be used in include directory names, and the names must have a trailing backslash \ . Directories can only be found relative to the search start directory: subdir1\
To exclude certain directories in the search, wildcards can be used in exclude directory names, and the names must have a trailing backslash \ . Directories can be excluded anywhere, or relative to the search start directory:
1. Relative to the search start directory: |\subdir1\ or |\subdir1\subdir2\ or \
2. Relative to any subdirectory: |subdir1\ or |subdir1\subdir2\ (no backslash at the start)
In my opinion this is one of the worst "features" of Total Commander. So in my opinion it's worth considering even if it is not easy.ghisler(Author) wrote: 2022-09-01, 09:55 UTC Well, if it were simple to change, I would have done that a long time ago...