But where I am looking for is a similar program which searches for *filenames* also in compressed files, like
.zip files
and specially
.jar
files.
Does anybody have hints or tips about any existing programs (or maybe it can maybe implemented for TSE) which can be used for searching of filenames (e.g. you want to find all filenames containing 'myfilename' in all files (including .zip files) in the c:\windows directory).
(An existing program which did the job was 'where.com' (from Keith Ledbetter), but not really available anymore as far as I know currently).
I tried http://www.wingrep.com but that did not really work at all when I tried it that version.
Any suggestions are welcomed.
Thanks,
with friendly greetings,
Knud van Eeden
The investment of buying the TSE text editor has been one of the best investments made.
* Where ("Where" on Potpourri PickList or "Where Is" under Util Menu)
This macro searches one or more drives for files that match an indicated
filename specification. A PickList of all matching filenames is displayed,
allowing you to select file(s) to edit or to delete (or on which to perform
other available operations).
When you execute the macro, it prompts you for the filename for which to
search, with "Search for file:". Following is the accepted format of the
filename specification:
- A complete name or an ambiguous name (with wildcard characters) can be
specified, and can optionally include drive and/or path information.
- Multiple filename specifications can be entered.
- One or more drives can be specified. If particular drive(s) are
specified, the macro will limit the search to the indicated drive(s);
if no drive is specified, all drives (for which the macro is configured
to search) will be searched. The drive(s) can be specified only as the
beginning character(s) of the file specification entry; the indicated
drive(s) will apply to all filename specifications that are entered.
- If a particular directory is included in a filename specification, the
macro will limit the search for that filename to the indicated
directory and all of its subdirectories; if no directory is specified,
the macro will search all directories and subdirectories of each drive
that is searched.
Once you enter a filename specification, the macro then searches the
applicable drives and directories. All matching filenames are displayed in
a PickList. You can select a particular file to edit or delete by
positioning the cursor bar on that filename in the PickList, and pressing
<Enter>. Or you can tag multiple files (by pressing the <Spacebar> with the
cursor bar positioned on a file) on which to operate. The PickList is
automatically removed once the indicated operation is performed. Otherwise,
to remove the PickList (and terminate the command), press <Escape>. Or, to
terminate the macro and release any memory used to store the PickList (if
one exists), press <Alt X>.
While a search is in progress, you can immediately stop the search by
pressing <Escape>. A PickList will be presented of those filenames that
were located before the search was terminated.
While the "Search for file:" prompt is displayed, a number of options are
available:
- To display an initial HelpScreen for the macro, press <F1>.
- To configure several options of the macro, press <Alt C>. You can then
select the drives that are to be searched (when no drives are included
in the specification entry); you can choose to add the Where macro to
your AutoLoad List; or you can choose to remove the Where macro from
your AutoLoad List.
- To re-display the PickList from a previous search, press <Alt L>.
While a PickList is displayed, other options are available:
- To display additional HelpScreen information about other file
operations available from the PickList, press <F1>.
- To sort the list of entries in the PickList, press <Ctrl S>. A pop-up
menu allows you to select the sorting sequence.
- To tag the file on which the cursor bar is positioned, press the
<Spacebar>.
- To display the entire directory containing the file on which the cursor
bar is positioned, press <Alt L>.
I tend to run many search tools one after the other (via a serie of YesNo( "do you want to run this search program" in a TSE macro). I choose which one is appropriate for the given search (e.g. filename search or text search).
E.g. first TSE grep, then Everything, then TSE text search, then a multibrowser search, ...
So any new solution (e.g. Peter Birch's macro) or the TSE 'where is' macro I just add to that list.
I will add TotalCommander also.
That search option was not known and never used. Great tip. Thanks.
> Wouldn't it be easier to to tie each search to a particular key combination?
Yes, in general:
1. key: if very frequent use
2. menu: personal (search)
3. menu: job only (search)
4. macro: all (search): which shows all options serially to you, via YesNo() you select what you want more a reminder which options are available
===
> Imagine you have 10 search tools :)
At least. Searching (=usually finding answers (in a very easy way)) is one of the most important operations for me.
You tend to forget and sometimes you say hey that one comes really handy, why did I not think of that (e.g. because it is obscured in some obscure menu). If it is showed from a list that is less likely to happen.
So I have for each major operation (=search, run, solve, ...) one macro which shows me all options from a YesNo() list as a reminder.
===
> Wouldn't those search tools return identical results?
Yes possible in some special cases, but in general maybe more not.
E.g. Google Desktop <-> Copernic desktop search <-> Yahoo X1 desktop search.
Each product has it own merits. E.g. faster <-> slower / less <-> more details / less <-> more possibilities. One maybe shows what the other does not show.
Same goes for TSE macros and other external programs.
You can then select a few best and or see all possibilities or something in between.
===
> I think text search in general can be classified as below:
Great classification. Not seen that before. Thanks for that.
- Source Navigator for multi-languages
- IDE such as VC, Eclipse, etc.
===
> 4) Search in packed files
At this moment:
1. Peter Birch's macro (currently until TSE v2.x only)
A file find the will search the current drive
filefin2.zip 7473 08-18-94 including zip files. All source. Works with
directories nested up to 7 deep. Uploaded by:
Peter Birch
2. Total Commander
3. CoolFind
4. Sun Jarscan
5. Yaworski Jarscan
===
> 5) Search text remotely (across ftp/sftp/http)
Do you know any example programs or macros for that? Thanks
> TotalCmd does a lot more. Join its forum to learn all the tips and tricks.
Absolutely.
TotalCommander (bought) is in my top list of most used tools (=TSE, Paperport, 4NT, Total Commander).
With them I do almost everything (e.g. fully automatically upload and maintenance of websites).
TSE is the main motor / starting point / control center for that all (using a hierarchy of about 10 TSE MENUBARS -> 1000 TSE MENUs -> up to 10000 TSE macros -> possibly interacting with one or more of the 1000000 files on harddisks further otherwise local network otherwise Internet). Mouse driven (mostly) otherwise shortcut keys.
TotalCommander has so many hidden options that chances that you discover one which you did not know about are certainly there. Thanks for that again.
"I want to know in which .jar file my .class file is stored"
So what you do is start searching in this .jar and possibly also .zip files for '.class' filenames (e.g. 'myfilename.class').
-Grep will thus do, because filenames are by design stored verbatim in the zip or jar file.
Programs which further search in compressed files are Total Commander.
But they will not find .class files in nested .jar
But what actually is necessary to find them all is to search for filenames in *nested* .jar or .zip files.
That is a .zip in a .jar, or a .jar in a .zip, or a .zip in a .zip or a .jar in a .jar.
Or even multiple times (like a jar in a jar in a jar).
I usually have to deal with .jar in a .zip file.
FYI the only external programs which I have found doing this search for filenames in nested .jar or .zip files (that I have found until now) are:
1. -Zipscan
2. -Sun jarscan (using the -r switch)
===
Note:
Maybe if Peter (Birch) finds it relevant, he might implement this search in (recursive) nested .zip and .jar files also in his TSE 'ff.s' macro.
That would be very nice to have.
===
In general for searching filenames on your harddisk I would like to point your attention to
Everything'.
This is an extremely fast filename search program which shows the locations of any filename on your harddisk in *seconds*. Thus almost instantaneously. But it can not search in .zip and .jar files, and only works on NTFS volumes, but it is still one of the most versatile programs regarding file search. It is a free program.
===
Thanks
===
See also:
http://www.knudvaneeden.com/tinyurl.php?urlKey=url000368
---
with friendly greetings,
Knud van Eeden