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

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Postkutscher
Power Member
Power Member
Posts: 556
Joined: 2006-04-01, 00:11 UTC

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

Post 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.
Last edited by Postkutscher on 2009-08-21, 20:41 UTC, edited 2 times in total.
User avatar
Samuel
Power Member
Power Member
Posts: 1930
Joined: 2003-08-29, 15:44 UTC
Location: Germany, Brandenburg an der Havel
Contact:

Post 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.
Postkutscher
Power Member
Power Member
Posts: 556
Joined: 2006-04-01, 00:11 UTC

Post 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:
User avatar
Samuel
Power Member
Power Member
Posts: 1930
Joined: 2003-08-29, 15:44 UTC
Location: Germany, Brandenburg an der Havel
Contact:

Post 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.
Postkutscher
Power Member
Power Member
Posts: 556
Joined: 2006-04-01, 00:11 UTC

Post 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.
User avatar
Samuel
Power Member
Power Member
Posts: 1930
Joined: 2003-08-29, 15:44 UTC
Location: Germany, Brandenburg an der Havel
Contact:

Post 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".
User avatar
white
Power Member
Power Member
Posts: 4675
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

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

Post 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.
Postkutscher
Power Member
Power Member
Posts: 556
Joined: 2006-04-01, 00:11 UTC

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

Post 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"?
User avatar
Hacker
Moderator
Moderator
Posts: 13102
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

white,
So content plugins cannot be used to solve your problem either.
I personally think they can.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

Why wouldn't a regex search of:
.*(Alpha.*Bravo|Bravo.*Alpha).* work?
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
User avatar
white
Power Member
Power Member
Posts: 4675
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post 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.
User avatar
Hacker
Moderator
Moderator
Posts: 13102
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post 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
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post 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) :(
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post 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
Last edited by Balderstrom on 2009-08-22, 11:38 UTC, edited 1 time in total.
User avatar
Samuel
Power Member
Power Member
Posts: 1930
Joined: 2003-08-29, 15:44 UTC
Location: Germany, Brandenburg an der Havel
Contact:

Post by *Samuel »

AFAIK the Problem is: TC doesnt load the full file to memory, so multiline regex strings are problematic.
Post Reply