Page 1 of 1
Make Search FIND TEXT do many terms not just 1 like Google
Posted: 2008-05-27, 00:53 UTC
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.
Posted: 2008-05-27, 16:03 UTC
by StatusQuo
Support+.
A light version could be checkboxes like
, 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
but not
(Maybe someone has a better idea?)
Posted: 2008-05-27, 16:57 UTC
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.
Posted: 2008-05-27, 17:55 UTC
by fenix_productions
2
dott
Just guessing: (text1(.*)text2)|(text2(.*)text1)
Will this plugin not be enough:
http://www.totalcmd.net/plugring/TextSearch.html
Posted: 2008-05-27, 18:15 UTC
by StatusQuo
2
dott
text1|text2
Thanks, the "|" works great for OR (it's even in the help, where I unfortunately overlooked it).
Posted: 2008-05-27, 18:32 UTC
by StatusQuo
2
fenix_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)
Posted: 2008-05-27, 18:54 UTC
by dott
2
fenix_productions
Indeed.
I cannot do much with RegEx but I feel that I could do everything
2
StatusQuo
Hänsel und Gretel had bread, you have a keyboard.

Posted: 2008-05-27, 19:12 UTC
by dott
This is more general if search for files with one, other or both text
(t1(.*)t2)|(t2(.*)t1)|(t1|t2)
Posted: 2008-05-27, 20:36 UTC
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.