The option to include specific directories has not been very useful and very confusing for a very long time. It's also not consistent with excluding specific directories. My suggestion is to make 2 changes which makes it much more useful and consistent:HISTORY.TXT wrote: New in Total Commander 5.51 Final (18.02.03):
...
- New search option to include/exclude specific dirs, e.g. | _vti*\ excludes all dirs starting with "_vti" (search, sync, branch view)
- If the specified include subdirectory doesn't start with a backslash \, do not try to find a match for this include directory only in the start directory of the search, but also in its subdirectories.
(When you specify an exclude subdirectory that doesn't start with a backslash, it also excludes subdirectories nested deeper. The same should apply for include subdirectories.)
So when specified to include subdir1\, include the following subdirectories in the search if they exist:- startdir\subdir1\
- startdir\level 1\subdir1\
- startdir\level 1\level 2\subdir1\
- etc.
- If a subdirectory is encountered that matches the include directory, include the whole thing. Don't look further inside this directory and include only the subdirectories that match the include directory.
(The current behavior makes no sense. You already established it should be included, so don't include only a part of it and exclude the rest. When you specify an exclude subdirectory, you also exclude the whole thing when a match is found, not only the part inside of it that matches the exclude directory.)
So when specified to include \subdir1\, include the following subdirectories in the search:- startdir\subdir1\ and all his subdirectories
- startdir\subdir1\ and all his subdirectories
- startdir\level 1\subdir1\ and all his subdirectories
- startdir\level 1\level 2\subdir1\ and all his subdirectories
- etc.
Describing my suggestion by means of an example:
Search for *.txt in c:\test\ and specify subdir1\ either as include subdirectory or as exclude subdirectory. The search should work like this:
- Search the directory c:\test (not its subdirectories) for *.txt (unchanged)
- If subdir1\ is specified as an exclude subdirectory: Search all subdirectories for *.txt, except for subdirectories named "subdir1" (and all its subdirectories) anywhere in the directory tree. (unchanged)
- If subdir1\ is specified as an include subdirectory: Don't search any subdirectories for *.txt, except for subdirectories named "subdir1" (and all its subdirectories) anywhere in the directory tree. (changed behavior)