Find files: Do not search in subdirectories of ...

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Find files: Do not search in subdirectories of ...

Post by *DrShark »

It has something similar to "Ignore list", "IgnoreLinks" or "Search in subdirectories" TC options, as well as some of my previous suggestions, but with some differences.

I suggest to add to internal TC plugin new property "IgnoreSubdirsOf" with OP "contains"* and Value available for custom path. Other Content plugins options applied as a filter after search is done, but this should act like an opposite of "Search in subdirectories" Find files option, so TC wouldn't even try to find anything in/under* path set for IgnoreSubdirsOf rule. Main "Search in subdirectories" setting must be ignored in relation of IgnoreSubdirsOf rules.

* for IgnoreSubdirsOf proprety different OPs may exist, making deep level adjustable a little bit:
OP "containsall" may tell TC not to search anything under Value path;
OP "containssubdirs" - not to search under subdirs of value path, making files in root of Value path still available for search

This way user can save several search templates with different rules.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
Dalai
Power Member
Power Member
Posts: 10024
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

I don't get it. Where's the difference to a search using plugins:

Code: Select all

tc | path | !contains | <your_value_here>
This way, you can already ignore certain directories while searching.

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
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Dalai,
Actually you can't ignore directories while searching, you only can filter them out from search results, but TC will enumerate their contents and check names/attributes/plugins anyway.
User avatar
Dalai
Power Member
Power Member
Posts: 10024
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

Ah, you're right. That enumeration should be pretty fast, though, since the name is the first thing known about a file/directory. However, if it's a deep directory structure, it could take a while, so it would indeed be nice to be able to skip it during search.

Selecting directories (and using the option "Only search in selected directories/files") might be able to limit the search to the directories one needs to find files in. And, let's see what TC9 with the integration of Everthing has to offer. Nonetheless, it would be a nice feature.

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
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

Well, in TC 8.0x I had a problem that I don't see currently in TC 8.52a, and that problem was a primary target of my suggestion, because I did't want to use IgnoreLinks while still having certain locations blocked only for search.
I had a following path:
c:\Users\username\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\Folder\AppData\
Here AppData (green-colored) is a junction to AppData (yellow-colored; may be black colored in some browsers).
It made the infinite loop with search, so when search for some name in
c:\Users\username\AppData\
I also got it for
c:\Users\username\AppData\...\AppData\...
and
c:\Users\username\AppData\...\AppData\...\AppData\...
etc.
MVV gave a basic description why it could happen. In TC 8.52a I don't get such loops in search, even without any Ignore-related option active, so it seems that TC handles now this special case with junctions.

Still my suggestion will be helpful for deep directory structures.
Last edited by DrShark on 2015-11-15, 19:31 UTC, edited 1 time in total.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
Dalai
Power Member
Power Member
Posts: 10024
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

2DrShark
Do you know that you can toggle the ignore list using cm_SwitchIgnoreList on a button or the start menu (or even the command line)? I know that it's not the same like your suggestion, but it might make thing easier.

And, yes, TC 8.50 (IIRC) has some recognition of infinite loops, which is especially helpful for directories like AppData.

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
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Ignore list isn't too much usable for e.g. ignoring junctions/symlinks because every link must be added to it explicitly.

It would be much nicer to be able to ignore directories using plugin fields. But currently I think plugins tab is mostly for files. :!:
Perhaps an option to skip directory contents if it is rejected by some plugin could help but it would be hard to mix plugin definitions for files and folders, separate plugins tab for dirs would help.
Dalai wrote:That enumeration should be pretty fast, though, since the name is the first thing known about a file/directory.
It depends on attributes/fields check order. E.g. if you search for text in files, I don't know what TC checks first, file contents or plugin fields etc.
Post Reply