Page 1 of 2

Find text:"alpha" AND "bravo" in arch.

Posted: 2009-08-21, 17:19 UTC
by Postkutscher
I want find some files (logs) , which contains two words "alpha" AND "bravo" when "Search archives" is checked.
I can`t find any workaround for this purpose.

If I don`t need look into archives I made search for "Alpha", then "feed to listbox", then search for "Bravo". But if archives are affected this method cannot be used.

I suggest that either search for multiple words would be added, or "feed to listbox" brings the whole archives (not files from archives) to panel in order to allow "search in found".

If this already can be done using any plugin, please point me to the solution.

Posted: 2009-08-21, 17:34 UTC
by Samuel
There were suggestions to extend the usage of tcmatch.dll (for example "Quicksearch eXtended") to the search form.

This would solve not only this problem.
I would support that.

Posted: 2009-08-21, 17:41 UTC
by Postkutscher
I have a little edited my first post. The title was not completely shown.

2Samuel
Do you mean, that QuickSearch eXtended can search within archives? :shock:

Posted: 2009-08-21, 17:47 UTC
by Samuel
[ot]No. (Should I add this? Perhaps it could be done by a content plugin.)[/ot]

TC currently sends every name in the current folder to "tcmatch.dll" to ask it if the name should be in list or not.

It could be easily extended to the search. TC could send every name of the files in the folders it should search in to the "tcmatch.dll" to ask it if the name should be in list or not.

Posted: 2009-08-21, 17:51 UTC
by Postkutscher
2Samuel
Then you should possibly not good understand my question.
"alpha" and "bravo" are not part of the names of the files. They are content of the text files (in UTF8 unfortunately, so I cannot use regexp for my task :( )
It seems to me, that your tool have nothing to do with my problem, sorry.

Posted: 2009-08-21, 19:48 UTC
by Samuel
IMO your first post doesn't make clear that you want to search for content:
Postkutscher (first post) wrote:I want find some files (logs) , which consists two words "alpha" AND "bravo" when "Search archives" is checked.
Perhaps you confused "consist" and "contain".

Re: Find text:"alpha" AND "bravo" in arc

Posted: 2009-08-21, 20:12 UTC
by white
Postkutscher wrote:I want find some files (logs) , which consists two words "alpha" AND "bravo" when "Search archives" is checked.
I can`t find any workaround for this purpose.
As far as I know, there isn't any.
Postkutscher wrote: If this already can be done using any plugin, please point me to the solution.
From the Help page "Find files: Plugins":
TC's Help wrote:Note: Content plugins only work with the normal file system (files and directories), but not with virtual folders like the desktop, ftp connections, files in archives, or file system plugins.
So content plugins cannot be used to solve your problem either.

Re: Find text:"alpha" AND "bravo" in arc

Posted: 2009-08-21, 20:40 UTC
by Postkutscher
Samuel wrote:Perhaps you confused "consist" and "contain".
Yes, you are right. Sorry. I`m going to edit this.
white wrote:
Postkutscher wrote:I want find some files (logs) , which consists two words "alpha" AND "bravo" when "Search archives" is checked.
I can`t find any workaround for this purpose.
As far as I know, there isn't any.
Thank you.

Then I would like to suggest this missing feature. Can this thread be moved to "suggestions"?

Posted: 2009-08-21, 23:12 UTC
by Hacker
white,
So content plugins cannot be used to solve your problem either.
I personally think they can.

Roman

Posted: 2009-08-22, 01:12 UTC
by Balderstrom
Why wouldn't a regex search of:
.*(Alpha.*Bravo|Bravo.*Alpha).* work?

Posted: 2009-08-22, 07:07 UTC
by white
Hacker wrote:white,
So content plugins cannot be used to solve your problem either.
I personally think they can.
If they can, how will they display the file names of the found files inside archives?
Balderstrom wrote:Why wouldn't a regex search of:
.*(Alpha.*Bravo|Bravo.*Alpha).* work?
Because Total Commander does a line by line search and "Alpha" and "Bravo" may be on different lines.

Posted: 2009-08-22, 10:40 UTC
by Hacker
white,
If they can, how will they display the file names of the found files inside archives?
I admit, they will only be able to display the archive names.

Roman

Posted: 2009-08-22, 10:56 UTC
by fenix_productions
Hacker wrote:white,
If they can, how will they display the file names of the found files inside archives?
I admit, they will only be able to display the archive names.
Not really but solving it would require someone* to create WDX plugin which could provide names of the files from archive within ft_string/ft_stringw field. It should also act as proxy for WCX files (to get the names). There are two problems though: the length of string field and writing ZIP support (no plugin for that).

*) I tried to write it few weeks ago but I failed (pointers are still my Achilles' heel) :(

Posted: 2009-08-22, 11:21 UTC
by Balderstrom
Ah, then TC just needs to support actual regexp or PCRE. Which inherently allows for multiline regex strings.

i.e. (?m)(Alpha.*(\n+)?.*Bravo|Bravo.*(\n+)?.*Alpha)

U:\Usr\UnxUtils\usr\local\wbin>grep -P "(?m)(Alpha.*(\n+)?.*Bravo)" "Copy of descript.ion" -->
ow32Alphaenen606.exe Opera 6.06 Final (03.18.2002)
Opera 6.00 Final (12.18.2001)
Opera 6.0beta 1 (11.13.2001)
ow32eBravonen754u2.exe Opera 7.54 up2 (04.02.2005)
Opera 7.50 Final (05.12.2004)
Opera 7.00 Final (01.28.2003)
Opera 7.0beta 1 (11.13.2002)
Thus a script, could run thru unpacking the archives selected (in question) grep the unpacked logs, pipe results to a file, delete unpacked files. Easily. And if a script can do that, TC could do all of that by simply supporting real regexp.

ie: U:\Usr\UnxUtils\usr\local\wbin>grep -H -m1 -c -P "(?m)(Alpha.*(\n+)?.*Bravo)" "Copy of descript.ion" -->
Copy of descript.ion:1

Posted: 2009-08-22, 11:28 UTC
by Samuel
AFAIK the Problem is: TC doesnt load the full file to memory, so multiline regex strings are problematic.