Make Search FIND TEXT do many terms not just 1 like Google

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
abodia
New Member
New Member
Posts: 1
Joined: 2008-05-27, 00:35 UTC
Location: Charleston West Virginia
Contact:

Make Search FIND TEXT do many terms not just 1 like Google

Post by *abodia »

I wish, in
SEARCHing thru files, with
FIND TEXT command, that I could say more than word or phrase,
to use combinations like you would in Google Search.
combination like: John Doe AND Charleston
or "John Doe" AND Charleston

I think the FIND TEXT has to be an identical string only, no other combinations.
Total Commander is most important program in all my work for decades.
Ted in West Virginia
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

Support+.

A light version could be checkboxes like
  • [ ] AND
    [ ] OR
, treating every word as a separate search string.
So files would be found if they contain all (AND) or at least one (OR) word.

With RegEx I could not achieve this yet, because text1(.*)text2 would find a file containing

Code: Select all

text1 is followed by text2.
but not

Code: Select all

text2 is followed by text1.
(Maybe someone has a better idea?)
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
dott
Senior Member
Senior Member
Posts: 285
Joined: 2007-03-04, 00:58 UTC
Location: La Plata, Argentina

Post by *dott »

With RegEx you can search for tetx1|text2 you will solve the OR issue.
I'm sure someone know how to accomplish the AND.
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

2dott

Just guessing: (text1(.*)text2)|(text2(.*)text1)

Will this plugin not be enough:
http://www.totalcmd.net/plugring/TextSearch.html
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

2dott
text1|text2
Thanks, the "|" works great for OR (it's even in the help, where I unfortunately overlooked it).
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

2fenix_productions
(text1(.*)text2)|(text2(.*)text1)
This basically works - but unfortunately only if the searched words are found in the same line, but thanks anyway.
BTW, it would get quite complex with three or more phrases. ;)
Great, the TextSearch plugin is indeed a good solution for both AND and OR (even with easier user interface than RegEx usage), thanks for the hint.

Apart from combining AND/OR in one search, this should solve most of the issue, IMO. abodia?


(some keywords for finding this thread again: boolean operators in file search / file text search)
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
dott
Senior Member
Senior Member
Posts: 285
Joined: 2007-03-04, 00:58 UTC
Location: La Plata, Argentina

Post by *dott »

2fenix_productions
Indeed.
I cannot do much with RegEx but I feel that I could do everything


2StatusQuo
Hänsel und Gretel had bread, you have a keyboard. :D
User avatar
dott
Senior Member
Senior Member
Posts: 285
Joined: 2007-03-04, 00:58 UTC
Location: La Plata, Argentina

Post by *dott »

This is more general if search for files with one, other or both text
(t1(.*)t2)|(t2(.*)t1)|(t1|t2)
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

It would be nice to see text search feature extended.

I've always liked an idea of using tree control where parent nodes would be files names and child ones could contain i.e. line number with its content and indicated (bold) searched text occurrences.

Some existing "search and replace" tools have features which could be really usable in TC:
http://www.funduc.com/images/srshot.gif
http://www.inforapid.de/assets/images/search.gif

At least showing some information about text occurrences count or line numbers in "Find Files" window would be big step. After all: even console commands such as find or findstr can do that.

I know that I can always use these applications but full integration with my favourite file manager is not possible.
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
Post Reply