Search including \subdir\subdir\ not working

Bug reports will be moved here when the described bug has been fixed

Moderators: Hacker, petermad, Stefan2, white

User avatar
jonathanpoulin
Member
Member
Posts: 131
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Search including \subdir\subdir\ not working

Post by *jonathanpoulin »

Hi,

I think I found a bug with the search when we want to include certain directories only, both 1) relative to the search start directory, and 2) any subdirectory.

Example (search in C:\Windows\INF):

Search for:

Code: Select all

*.ini \usbhub\04*\
It returns no search result (should returns 2 files).

To make it returning the 2 files, I must add spaces (one or more) between the two subdirs, like the following. Sounds strange to me.

Search for:

Code: Select all

*.ini \usbhub\  04*\
Interestingly, if I want instead to exclude the 2 files, I must not separate subdirs with space. For me, this is more natural.

Search for:

Code: Select all

*.ini|\usbhub\04*\
The Help file does not indicate to separate subdir1 and subdir2 with space:
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)
If you exclude a directory, all its subdirectories will be excluded too.
Thanks,
Jonathan Poulin
User avatar
white
Power Member
Power Member
Posts: 5743
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Search including \subdir\subdir\ not working

Post by *white »

This is designed this way. Earlier, I referred you to the wiki page https://www.ghisler.ch/wiki/index.php?title=Search, where it says:
Wildcards are also allowed, as well as nested folders (although the latter is only meaningful when used in an exclude section [1]
Click the [1] to read the explanation by Mr. Ghisler.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50386
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Search including \subdir\subdir\ not working

Post by *ghisler(Author) »

The problem with a search like this:
*.ini \usbhub\04*\
is that \usbhub\04*\ will be the ONLY allowed subfolders. But since "usbhub" itself isn't allowed, Total Commander never gets there to see the 04* folders.
Author of Total Commander
https://www.ghisler.com
User avatar
AntonyD
Power Member
Power Member
Posts: 1554
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: Search including \subdir\subdir\ not working

Post by *AntonyD »

But since "usbhub" itself isn't allowed
Why you decided to think so? From where it was deduced from?
#146217 personal license
User avatar
tuska
Power Member
Power Member
Posts: 4046
Joined: 2007-05-21, 12:17 UTC

Re: Search including \subdir\subdir\ not working

Post by *tuska »

Total Commander can find the files when using 'Everything'.

Code: Select all

ev:C:\Windows\INF *.ini \usbhub\04*\
[2 files and 0 directories found]
C:\Windows\INF\usbhub\0407\usbperf.ini
C:\Windows\INF\usbhub\0409\usbperf.ini


Windows 11 Pro (x64) Version 23H2 (OS Build 22631.3880)
TC 11.03 x64/x86 | 'Everything' 1.5.0.1383a (x64)
User avatar
jonathanpoulin
Member
Member
Posts: 131
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Re: Search including \subdir\subdir\ not working

Post by *jonathanpoulin »

AntonyD wrote: 2024-07-12, 12:01 UTC
But since "usbhub" itself isn't allowed
Why you decided to think so? From where it was deduced from?
Good question.
Thanks,
Jonathan Poulin
User avatar
jonathanpoulin
Member
Member
Posts: 131
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Re: Search including \subdir\subdir\ not working

Post by *jonathanpoulin »

tuska wrote: 2024-07-12, 12:13 UTC Total Commander can find the files when using 'Everything'.

Code: Select all

ev:C:\Windows\INF *.ini \usbhub\04*\
[2 files and 0 directories found]
C:\Windows\INF\usbhub\0407\usbperf.ini
C:\Windows\INF\usbhub\0409\usbperf.ini


Windows 11 Pro (x64) Version 23H2 (OS Build 22631.3880)
TC 11.03 x64/x86 | 'Everything' 1.5.0.1383a (x64)
I don't know why but for me it returns nothing.

I am using TC 11.03 x64/x86 and 'Everything' 1.4.1.1024 (x64). I don't know if 'Everything' version has something to do here.
Thanks,
Jonathan Poulin
User avatar
tuska
Power Member
Power Member
Posts: 4046
Joined: 2007-05-21, 12:17 UTC

Re: Search including \subdir\subdir\ not working

Post by *tuska »

2jonathanpoulin

Tick this option in "Everything Options" > "Search":

Code: Select all

✅ Match path when a search term contains a path separator
then it will also work in 'Everything' 1.4.1.1024 (x64).
User avatar
jonathanpoulin
Member
Member
Posts: 131
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Re: Search including \subdir\subdir\ not working

Post by *jonathanpoulin »

tuska wrote: 2024-07-12, 12:51 UTC 2jonathanpoulin

Tick this option in "Everything Options" > "Search":

Code: Select all

✅ Match path when a search term contains a path separator
then it will also work in 'Everything' 1.4.1.1024 (x64).
This was already enabled.
Thanks,
Jonathan Poulin
User avatar
tuska
Power Member
Power Member
Posts: 4046
Joined: 2007-05-21, 12:17 UTC

Re: Search including \subdir\subdir\ not working

Post by *tuska »

jonathanpoulin wrote: 2024-07-12, 13:33 UTC
tuska wrote: 2024-07-12, 12:51 UTC 2jonathanpoulin

Tick this option in "Everything Options" > "Search":

Code: Select all

✅ Match path when a search term contains a path separator
then it will also work in 'Everything' 1.4.1.1024 (x64).
This was already enabled.
Untick additionally this option in "Everything Options" > "Search":

Code: Select all

▢ Match whole filename when using wildcards
User avatar
AntonyD
Power Member
Power Member
Posts: 1554
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: Search including \subdir\subdir\ not working

Post by *AntonyD »

I also still use 1.4 and here also there are no results from the command:
C:\Windows\INF *.ini \usbhub\04*\
which I've put directly inside the Everything's search field.
only cmd "C:\Windows\INF\usbhub\04*\*" gives to me the results.

After that I've tried to use 1.5 alpha and YES - it gives to me the mentioned above result.
So the version of the program is matter here! not a checkmark inside the Settings.

P.S. also it very strange but the newest version of Everything was NOT able to index more than 50,000 files/folders
in comparison with 1.4 version installed here...
And it does not even have a proper translated LANG file for itself. Indeed it's an ALPHA stage of the development)))
#146217 personal license
User avatar
tuska
Power Member
Power Member
Posts: 4046
Joined: 2007-05-21, 12:17 UTC

Re: Search including \subdir\subdir\ not working

Post by *tuska »

AntonyD wrote: 2024-07-12, 14:43 UTC I also still use 1.4 and here also there are no results from the command:
C:\Windows\INF *.ini \usbhub\04*\
... it works for me with the settings mentioned.

However, the query with the quotation marks doesn't work for me in Everything 1.4.
I'm not going to pursue this issue in EV 1.4 any further.
AntonyD wrote: 2024-07-12, 14:43 UTC So the version of the program is matter here! not a checkmark inside the Settings.
Not confirmed.
However, there are differences between EV 1.4 and EV 1.5a.
AntonyD wrote: 2024-07-12, 14:43 UTC P.S. also it very strange but the newest version of Everything was NOT able to index more than 50,000 files/folders
in comparison with 1.4 version installed here...
Not confirmed: ~800 000 items (~600 000 files, ~200 000 folders) <-- INDEXED!... + Properties, + Content(!)
There may be various reasons for this - please create a separate post [in the Everything forum] if you want.
AntonyD wrote: 2024-07-12, 14:43 UTC And it does not even have a proper translated LANG file for itself.
The language file for 1.5a will only be made available from the beta version onwards.
Currently only the English language is fully available.
However, you can also use the language file from the homepage to set your native language.
AntonyD wrote: 2024-07-12, 14:43 UTC Indeed it's an ALPHA stage of the development
Yes, but it far surpasses the last available 1.4 public release in every way.
Those who work exclusively with it on a daily basis will be able to confirm this.

For me, the 'Everything' topic is now closed with this post
as I certainly don't want to continue this topic as an 'Everything' discussion topic.
User avatar
white
Power Member
Power Member
Posts: 5743
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Search including \subdir\subdir\ not working

Post by *white »

ghisler(Author) wrote: 2024-07-12, 10:24 UTC The problem with a search like this:
*.ini \usbhub\04*\
is that \usbhub\04*\ will be the ONLY allowed subfolders. But since "usbhub" itself isn't allowed, Total Commander never gets there to see the 04* folders.
AntonyD wrote: 2024-07-12, 12:01 UTC
But since "usbhub" itself isn't allowed
Why you decided to think so? From where it was deduced from?
"usbhub" itself isn't allowed because it is designed this way. As Mr. Ghisler explained in the post I mentioned. Since \usbhub\04*\ are include only folders and \usbhub\ isn't included as include only folder, TC never traverses \usbhub\ and thus \usbhub\04*\ is never matched.

So you would have to use:

Code: Select all

*.ini \usbhub\04*\ \usbhub\
However, all .ini files in the usbhub folder will be included in the search results as well. And subfolders of folders that match \usbhub\04* will not be searched.

If you continue reading beyond Mr. Ghisler's post that I referenced, you'll find my suggestion to modify this behavior. And that Mr. Ghisler expressed this is challenging to implement. I came up with pseudocode in my head to solve this. Maybe I will post it later. It is not that complicated, I think.
User avatar
AntonyD
Power Member
Power Member
Posts: 1554
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: Search including \subdir\subdir\ not working

Post by *AntonyD »

"usbhub" itself isn't allowed because it is designed this way.
It is understandable that it was implemented in this way - if only because we see it in a practical form - when we run this search in the program.
The question was in a more clarifying vein: on the basis of what considerations, logic and common sense did this "design" turn out to be in this form as it is now? I don't see such logic. If a path is specified "in its entirety", then it is "in its entirety" and is used for both inclusion and exclusion. And here the whole string is simply taken and cut into some parts - and then these parts suddenly receive the logic of use, which the user did NOT put on his side.

It is very good and pleasant to hear that a more reasonable solution can be proposed on your part.
and perhaps your pseudocode will be the most balanced solution. I hope at least for that.
The current implementation is definitely no good.
The only good thing is that I have so far managed not to encounter such a form of search request.
Otherwise, I would definitely go crazy when I saw that Total doesn’t find files that are exactly match
to these paths where I directly indicated to look for them...
#146217 personal license
User avatar
jonathanpoulin
Member
Member
Posts: 131
Joined: 2020-12-19, 12:09 UTC
Location: Saint-Marc-des-Carrières, QC Canada
Contact:

Re: Search including \subdir\subdir\ not working

Post by *jonathanpoulin »

tuska wrote: 2024-07-12, 15:39 UTC However, the query with the quotation marks doesn't work for me in Everything 1.4.
I'm not going to pursue this issue in EV 1.4 any further.
I know this is not a topic about Everything, but just wanted to let you know that the following query with or without quotation marks works for me in Everything 1.4.

Code: Select all

"C:\Windows\INF\usbhub\04*\*"
Of course, with that setting enabled:

Code: Select all

✅ Match path when a search term contains a path separator
Thanks,
Jonathan Poulin
Post Reply