Search files usage scenario

Hello!

How to perform in DO the following sequence of actions without mouse:

  • select a set of files containing some text
  • browse these files, searching for entered text.

Look at TotalCommander, Search and then use F3 to open/browse files. I am looking for something with similar efficiency.

X.

[ol][li] Open a single pane lister.[/li]
[li] Open the Find Utility (Tools Menu > Find) below the lister pane and the folder tree.[/li]
[li] Open the Viewer pane vertically along the right side of the lister.[/li]
[li] Save this as a Lister Style or a Lister Layout for future ease-of-use.[/li]
[li] Configure your Find operation settings (you will have to do this each time as the Find Panel always stores the last Find operations settings):[ol][li] Click on the Simple Tab to use a Simple Find.[/li]
[li] Set Folder to the highest folder on your system that you want to search.[/li]
[li] Set Name matching: = "" (no quotes) If you want to limit your search to certain file types then ".(txt|doc)" (no quotes) would find all .txt or .doc files.
NOTE: For now just try *.txt files.[/li]
[li] Set Containing text: = " Your Search String" (no quotes)[/li]
[li] Set Results = "Find Results" (no quotes), or any name you want to name your file collection (the results of the Find). Change the second field so the results are shown in source (this will list the results in the lister pane).[/li]
[li] Enable or disable these options to your liking:[ul][li] Search Subfolders[/li]
[li] Search Zip files[/li]
[li] Clear Previous Results.[/li][/ul][/li][/ol][/li][li] With your Find options set, click on [Find]. The results of your search will be displayed in the Find Results (or other name if you gave it your own name) file collection. Each of these files contains your search text.[/li]
[li] Click on any of these files to display it in the Viewer Pane.
NOTE: You may have to do some other work to get all of the viewer plug-ins to work to display the maximum number of file types but we will leave this for another discussion. For now, just practice with .txt files.[/li]
[li] When the file opens in the viewer pane, Pressing Ctrl+F should allow you to search for the text string you are looking for (this will not be passed from the Find Utility to the Viewer Pane to the Plug-in that actually is used to view the file). I believe in most viewer plug-ins that support search, that pressing F3 will continue looking for the next occurrence of the text string.[/li][/ol]

You can also the Select command (Ctrl-S by default) in Advanced mode to highlight files containing certain text. Similar to using the Find tool but may or may not be preferable. You can modify the select command so that it hides files which don't match, too.

Not sure if there is a good way to jump to the "Contains" clause in a filter via the keyboard so I think both these solutions will involve a bit of mouse clicking and aren't the pure keyboard solution you're after.

Of course, you can assign a hotkey to toggle the viewer pane on and off if you want to. It's the Find/Select part which isn't ideal from the keyboard.

Hello!

Thanks for the answers.

I think I should just find some specialized tool for my purpose, as neither DO nor TC features fit me completely.

X.

Let us know if you find a good one. I keep wishing that TextPad had a better command-line interface so that I could kick off a "find in files" from Opus. Instead I have to launch TextPad and then faff about with its Find in Files dialog, setting the right path to search etc.

So maybe the right way it to find a text editor that may be started in search mode from command line?

X.

Exactly. Then it's really easy to make an Opus button which asks you for the string to search for and passes that string plus the current directory to the other program.

It would be like the "Grep" button in my Diff/Merge Toolbar but with a nicer UI that lets you open the files.

You can see the Grep button in action in this flash from my tutorial:

nudel.dopus.com/gtko_images/a_grep1.swf

This looks good:
mythicsoft.com/agentransack/

X.

Maybe I completly misunderstood, but doesn't Dopus offer the ability to search for text in files ?

And why can't you just have a grep-run using a command-line grep utility with a Dopus dialog asking for the search string ?

Ah, okay, sorry. I see now what you mean. Forget about my last post.