Results Menu

The Results menu lists commands for use with the Results panel. See the Results reference topic for more information on the Results panel itself.

Clear

Clears the Results panel, and unloads the information gathered by the last action from memory. Clearing the results also clears the results information from the File Selector, without clearing the file selection.

Open

Loads a previously saved PowerGREP results file. The results file also contains the action definition and file selection that produced the results. These will be loaded from the results file into the Action panel and File Selector respectively.

You can quickly reopen a recently opened or saved results file by clicking the downward pointing arrow next to the Open button on the Results toolbar. Or, you can click the right-pointing arrow next to the Open item in the Results menu. A new menu listing the last 16 opened or saved files will appear. Select “Maintain List” to access the last 100 files.

Save

Saves the results shown on the Results panel along with the action definition and file selection that produced those results into a PowerGREP results file. PowerGREP results files use a special XML-based file format. While you could process the XML file with other applications, the primary purpose of saving results files is to be able to inspect the results in PowerGREP at a later time.

If you want to process search matches found by PowerGREP with other software, running a “collect data” action with the appropriate target settings is usually more useful. That way, you collect only the raw search matches, grouped, sorted and delimited the way you want (if at all).

Favorites

If you often open the same files, you should add them to your favorites for quick access. Before you can do so, you need to save the results to a file. PowerGREP’s window caption will then indicate the name of the results file. Click the downward pointing arrow next to the Favorites button on the Results toolbar, or the right-pointing arrow next to the Results item in the Results menu. Then select “Add Current Results” to add the current results file to the favorites. Pick a file from the menu to open it.

If you click the Favorites button or menu item directly, a window will pop up where you can organize your results favorites. If you have many favorites, you can organize them in folders for easier reference later.

By default, the Favorites button is not visible on the toolbar. To make it visible, use View|Lock Toolbars to unlock the toolbars if you haven’t already. Then click on the downward pointing arrow at the far right end of the File Selector toolbar. A menu will pop up where you can toggle the visibility of all toolbar buttons. When you’re done, you can lock the toolbars again to prevent accidental changes.

Export

Saves the results as shown on the Results panel into a plain text file, an HTML file, or an RTF file. The file will contain exactly the same text as shown on the Results panel, including file headers, totals, etc. If you export to an HTML file or an RTF file, it will use the same color coding as the results in PowerGREP. This can be useful if you want to make the results part of a web site or a report you’re writing in a word processor.

If you want to process search matches found by PowerGREP with other software, running a “collect data” action with the appropriate target settings is usually more useful than exporting the results to a text file. That way, you collect only the raw search matches, grouped, sorted and delimited the way you want (if at all).

Print

Print the results as shown on the Results panel. A print preview will appear. The print preview allows you to configure the printer and page layout before printing.

Update Results

When automatic results update is off (see next item), use the Update Results command to check PowerGREP’s progress while previewing or executing an action, and after you’ve changed the display options on the Results panel.

Automatic Update

Automatic update is a toggle. When on, results are regularly updated while PowerGREP executes an action, and results are rearranged immediately when you change a display option on the Results panel. Using automatic update is only recommended when working with small results sets.

Next Match

Jump to the next highlighted match in the results.

Previous Match

Jump to the previous highlighted match in the results.

Next File

Jump to the next file in the results.

Previous File

Jump to the previous file in the results.

Make Replacement

Replaces the search matches in the selected text or the search match that the text cursor is on with the replacement text that was prepared for each match while executing the last PowerGREP action. The color of the replaced matches changes to indicate they have been replaced.

You can only make replacements after previewing or executing a search-and-replace action, since PowerGREP needs to know which replacement text to use. Quick Replace does not allow you to replace individual matches, since Quick Replace discards information about individual matches.

Revert Replacement

Reverts the search matches in the selected text or the search match that the text cursor is on by replacing them with the original text that was matched while executing the last PowerGREP action. The color of the reverted matches changes to indicate they have been reverted.

You can only revert replacements after previewing or executing a search-and-replace action. Quick Replace does not allow you to revert individual replacements, since Quick Replace discards information about individual matches.

Make Replacements in This File

Replaces the search matches in the file that the cursor points to in the results with the replacement text that was prepared for each match while previewing or executing the last PowerGREP action. The color of the replaced matches changes to indicate they have been replaced.

Revert Replacements in This File

Reverts the search matches in the file that the cursor points to in the results with the original text that was matched while previewing or executing the last PowerGREP action. The color of the reverted matches changes to indicate they have been reverted.

Make Replacements in All Files

Replaces all search matches shown in the results with the replacement text that was prepared for each match while previewing or executing the last PowerGREP action. The color of the replaced matches changes to indicate they have been replaced.

This command is enabled only if PowerGREP was able to hold the details of all replacements in all files in memory during the last action. If PowerGREP ran out of memory and only partial results are shown, the command to make replacements in all files is disabled to make sure you do not get the mistaken impression that you can make replacements in all files. The commands for replacing only the selected search matches or the search matches in the selected files will still be available to allow you to make the replacements that PowerGREP was able to keep in memory.

Revert Replacements in All Files

Reverts all search matches shown in the results with the original text that was matched while previewing or executing the last PowerGREP action. The color of the reverted matches changes to indicate they have been reverted.

This command is enabled only if PowerGREP was able to hold the details of all replacements in all files in memory during the last action. If PowerGREP ran out of memory and only partial results are shown, the command to revert replacements in all files is disabled to make sure you do not get the mistaken impression that you can use this command to revert the replacements in all files. The only way to revert all replacements in this situation is to use the Undo History to restore all the files from their backups. The commands for reverting only the selected replacements or the replacements in the selected files will still be available to allow you to revert the replacements that PowerGREP was able to keep in memory.

Folding

Use the Fold and Unfold items in the Folding submenu of the Results menu to collapse or expand the results for the file that the cursor is on in the results. You can also do this by clicking the small plus or minus in the left margin of the results. Use the Fold All and Unfold All items in the Folding submenu of the Results menu or their corresponding buttons on the Results toolbar to collapse or expand the results of all files.

Go to Bookmark

Move the cursor to one of ten bookmarks that you previously set in the results.

Set Bookmark

Set one of ten bookmarks at the item that the text cursor points to in the results. An item can be a highlighted match, context around a match, or a file name. The bookmark appears in the margin next to the item. If an item occurs more than once in the results, then the bookmark is shown next to each occurrence of the item. The bookmark remains associated with the item if you rearrange the results display by changing the display options using the drop-down lists on the Results panel. Bookmarks are also saved into the .pgr file when you use the Save item in the Results menu.

You can remove a bookmark by setting the same bookmark again on the same item. If you set a different bookmark on the same item, then the other bookmark that was already set on the item is removed, and the different bookmark is set.

If two items are shown on the same line in the results, such as two search matches found on the same line in a file, then it is possible to set two bookmarks on the same line, one on each item. Only one of the bookmarks will be shown in the margin. But both bookmarks will be set and respond to the Go to Bookmark command. If you rearrange the results so that the two items are no longer shown on the same line, such as by sorting search matches alphabetically, then both bookmarks will appear in the margin.

Font and Text Direction

Configure the text layout or select a previously configured text layout to change the font, text direction, cursor behavior, and spacing used by the Results panel. The Configure Text Layout topic in the reference section about PowerGREP’s Preferences screen has much more information on this.

Word Wrap

Toggles word wrap on or off. When on, lines in the results that are too long to fit the width of the Results panel are wrapped across multiple lines. When off, you will need to use the horizontal scroll bar to see the remainder of long lines.

Locate in File Selector

Use the File Selector to locate the file that the text cursor points to in the results.

Include in Next Action

Use the File Selector to mark the file that the text cursor points to in the results so that this file is included in the next action. You can find this item in the submenu o fthe Locate in File Selector menu item.

Exclude from Next Action

Use the File Selector to mark the file that the text cursor points to in the results so that this file is excluded from the next action. You can find this item in the submenu o fthe Locate in File Selector menu item.

Edit File

Click on a file name in the results, and select the Edit File command to open that file in PowerGREP’s built-in file editor. The editor can edit both text and binary files, and will highlight search matches.

If you prefer to use an external editor or application to view or edit the file, first configure the editor or application in the external editors preferences. You can then click on the downward pointing arrow next to the Edit button on the toolbar, or the right-pointing arrow next to the Edit item in the Results menu, to open the selected file with that application. The applications that are associated with that file type in Windows Explorer are also listed in the Edit submenu.

If you configured an external editor as the default editor, then the Edit File command will invoke that editor instead of using PowerGREP’s built-in editor. This saves you having to go through the Edit File submenu.

Open File in EditPad

Click on a file name in the results, and select the Edit File command to open that file in EditPad. EditPad is a most convenient text editor. Just like PowerGREP, EditPad has been designed by Jan Goyvaerts and is sold by Just Great Software Co. Ltd. EditPad is available at http://www.editpadpro.com/.

Delete Files

The Delete Files submenu of the Results menu allows you to delete four sets of files:

  1. Delete Selected Files and Folders: Delete the files that you have selected in the results. A file is selected if the selected text in the results includes its file name, one of its search matches, or some context of one of its matches.
  2. Delete Matched Files: Delete all the files in which search matches were found during the previously executed action.
  3. Delete Unmatched Files: Delete all the files that were searched through but did result in any matches during the previously executed action.
  4. Delete Target Files: Delete all target files that were created during the previously executed action. Note that this is not the same as undoing the action. PowerGREP’s undo history restores backup files. Deleting target files in the Results does not.

All four options ask for confirmation before actually deleting any files. The confirmation lists the files that will be deleted and gives you the option between moving the files to the Windows Recycle Bin or permanently deleting the files. Neither choice allows you to undo deleting the files in PowerGREP. If you choose to move the files to the Recycle Bin, you can recover the files manually from the Recycle Bin icon on your Windows desktop, at least until you make the Recycle Bin empty.

Delete Files

Copy Files

The Copy Files submenu of the Results menu allows you to copy four sets of files:

  1. Copy Selected Files and Folders: Copy the files that you have selected in the results. A file is selected if the selected text in the results includes its file name, one of its search matches, or some context of one of its matches.
  2. Copy Matched Files: Copy all the files in which search matches were found during the previously executed action.
  3. Copy Unmatched Files: Copy all the files that were searched through but did result in any matches during the previously executed action.
  4. Copy Target Files: Copy all target files that were created during the previously executed action.

All four options show a screen listing all files that you are about to copy. You can specify the destination for the copied files and whether backups should be created for any files that are overwritten. These are the same target destination and backup options as on the Action panel.

After the files are copied a new item appears in the Undo History. There you can undo copying the files if you choose to create backups, or if no files were overwritten during the copy operation. The Undo History also allows you to clean up backup files when you’re sure you don’t want to undo the operation.

Copy Files

Move Files

The Move Files submenu of the Results menu offers the same options as the Copy Files menu. It shows the same screen with options. The only difference is that the files are moved rather than copied to their new locations. Move operations are also added to the Undo History.

Move Files