cm_SearchFor No files found

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

User avatar
yahuu
Junior Member
Junior Member
Posts: 57
Joined: 2015-01-15, 03:19 UTC

cm_SearchFor No files found

Post by *yahuu »

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: cm_SearchFor No files found

Post by *ghisler(Author) »

It's not clear what you are trying to achieve, but you can't search for a backslash in a file name like this in the "Search for" field.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4594
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: cm_SearchFor No files found

Post by *white »

2yahuu
You cannot search a path in the Search for field. You can use the plugin tab and TC's internal tc plugin.
User avatar
yahuu
Junior Member
Junior Member
Posts: 57
Joined: 2015-01-15, 03:19 UTC

Re: cm_SearchFor No files found

Post by *yahuu »

ghisler(Author) wrote: 2022-08-30, 06:49 UTC It's not clear what you are trying to achieve, but you can't search for a backslash in a file name like this in the "Search for" field.
How to use this function
Image: https://ibb.co/9hqgpVs
User avatar
yahuu
Junior Member
Junior Member
Posts: 57
Joined: 2015-01-15, 03:19 UTC

Re: cm_SearchFor No files found

Post by *yahuu »

white wrote: 2022-08-30, 06:53 UTC 2yahuu
You cannot search a path in the Search for field. You can use the plugin tab and TC's internal tc plugin.
https://www.ghisler.ch/board/viewtopic.php?p=332377&hilit=subdir1%5Csubdir2%5C#p332377

This post shows that it can be used in this way.
User avatar
yahuu
Junior Member
Junior Member
Posts: 57
Joined: 2015-01-15, 03:19 UTC

Re: cm_SearchFor No files found

Post by *yahuu »

I got it, \subdir1\subdir2\ or subdir1\subdir2\ is filled in "Search in:"
Thank you both.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: cm_SearchFor No files found

Post by *ghisler(Author) »

Thanks for your feedback.

Moderator message

Moved to "will not be changed"
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4594
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: cm_SearchFor No files found

Post by *white »

yahuu wrote: 2022-08-31, 05:11 UTC How to use this function
Image: https://ibb.co/9hqgpVs
You can include or exclude folders, but it works differently than you probably think.
Suppose you have one folder "c:\test" in the "Search in" field.
All files and folders in c:\test will be searched.
If "Search in subdirectories" is set to level 1 or higher then all subfolders will be searched as well except for the ones you excluded, or only the ones you included in the "Search for" field.
These include or exclude folders must always have a trailing backslash \.
An include folder also needs a space character behind it if something follows it or if it's the only thing on the Search for line.

Example:

Code: Select all

Search for:  IncludeOnlyFolder\ *.*
Search in:   c:\test

Search in subdirectories:  all (unlimited depth)
Notice the space behind the include folder. You can leave out *.* , but you can't leave out the space character.
What it does is this:
  • Find all files and folders in c:\test (the include folder doesn't effect this)
  • Find all files and folders in c:\test\IncludeOnlyFolder
  • Find all files and folders in c:\test\IncludeOnlyFolder\IncludeOnlyFolder
  • Find all files and folders in c:\test\IncludeOnlyFolder\IncludeOnlyFolder\IncludeOnlyFolder
  • etc.
Adding a backslash to the front of the include folder:

Code: Select all

Search for:  \IncludeOnlyFolder\ *.*
Search in:   c:\test

Search in subdirectories:  all (unlimited depth)
Will do this:
  • Find all files and folders in c:\test (the include folder doesn't effect this)
  • Find all files and folders in c:\test\IncludeOnlyFolder

yahuu wrote: 2022-08-31, 05:15 UTC
white wrote: 2022-08-30, 06:53 UTC 2yahuu
You cannot search a path in the Search for field. You can use the plugin tab and TC's internal tc plugin.
https://www.ghisler.ch/board/viewtopic.php?p=332377&hilit=subdir1%5Csubdir2%5C#p332377

This post shows that it can be used in this way.
This post seems to be about the sync tool, not search.

yahuu wrote: 2022-08-31, 05:11 UTC How to use this function
Image: https://ibb.co/9hqgpVs
yahuu wrote: 2022-08-31, 05:31 UTC I got it, \subdir1\subdir2\ or subdir1\subdir2\ is filled in "Search in:"
Thank you both.
The help text you refer to is about the "Search for" field. The text is however very unclear and seems to be wrong. Or I don't get it. You can only include or exclude folder names, not partial paths as far as I know. So this seems to be a bug in the Help.
2ghisler(Author)
Please confirm.
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: cm_SearchFor No files found

Post by *petermad »

The text is however very unclear and seems to be wrong
I cannot make subdir1\subdir2\ work for inclusion when used in the Search for field (works for exclusion though) - only subdir1\ works for inclusion and only if subdir1 is a directory one level under the current dir.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
white
Power Member
Power Member
Posts: 4594
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: cm_SearchFor No files found

Post by *white »

petermad wrote: 2022-08-31, 10:37 UTC (works for exclusion though)
Confirmed.
petermad wrote: 2022-08-31, 10:37 UTC only subdir1\ works for inclusion and only if subdir1 is a directory one level under the current dir.
subdir1\ can only be searched if it was found at a level lower as well, because only subdir1\ is searched.

Now I understand why subdir1\subdir2\ doesn't work. Because one level deeper, it would only include subdir2\ and only include subdir1\subdir2\ at the same time, which can never be :) And it would never stop trying to include only 1 level deeper :)

So all is fine, only very confusing. Including folders isn't very useful for the most part.
This has probably been discussed before. Probably also by myself ;)
User avatar
yahuu
Junior Member
Junior Member
Posts: 57
Joined: 2015-01-15, 03:19 UTC

Re: cm_SearchFor No files found

Post by *yahuu »

white wrote: 2022-08-31, 12:22 UTC
petermad wrote: 2022-08-31, 10:37 UTC (works for exclusion though)
Confirmed.
petermad wrote: 2022-08-31, 10:37 UTC only subdir1\ works for inclusion and only if subdir1 is a directory one level under the current dir.
subdir1\ can only be searched if it was found at a level lower as well, because only subdir1\ is searched.

Now I understand why subdir1\subdir2\ doesn't work. Because one level deeper, it would only include subdir2\ and only include subdir1\subdir2\ at the same time, which can never be :) And it would never stop trying to include only 1 level deeper :)

So all is fine, only very confusing. Including folders isn't very useful for the most part.
This has probably been discussed before. Probably also by myself ;)

Yes, this is what I am confused, "subdir1\ *.bar" does work, but "subdir1\subdir2\ *.bar" doesn't work.
My original idea was to backup the TC's configuration, use a multi-condition search in the TC root directory, and now I used ZIPFROMLIST to achieve this.
Using everything's group search <> can also achieve this purpose.
Example:
ev:<path:dir1 *.ini><path:dir2 *.bar><path:dir3 !*.chm>
Anyway, thank you all!
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: cm_SearchFor No files found

Post by *Horst.Epp »

To backup the TC configuration I use a simple ZQAQ script
which saves the whole portable TC tree into an ZPQA archive.
Because ZPAQ is deduplicating I have currently 84 of TC version in one archive
with all its plugins and settings and the archive is still only 430 MB.
To restore or search this archive for a certain version I use the TC ZPAQ packer plugin.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: cm_SearchFor No files found

Post by *petermad »

2Horst.Epp
ZQAQ script, ZPQA archive, ZPAQ is deduplicating - I guess you mean ZPAQ in all three instances ;-)
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: cm_SearchFor No files found

Post by *Horst.Epp »

petermad wrote: 2022-08-31, 15:23 UTC 2Horst.Epp
ZQAQ script, ZPQA archive, ZPAQ is deduplicating - I guess you mean ZPAQ in all three instances ;-)
You are right :(
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: cm_SearchFor No files found

Post by *ghisler(Author) »

Yes, this is what I am confused, "subdir1\ *.bar" does work, but "subdir1\subdir2\ *.bar" doesn't work.
The 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.

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.
Author of Total Commander
https://www.ghisler.com
Post Reply