Main Part of The Action

The Action panel is the place where you define the task that PowerGREP will execute. All the options on the Action panel are arranged into nine parts, though not all those parts are always visible. This screen shot shows all nine:

Action panel showing all nine parts

The main part of the action is always visible, and always shows a Search box to enter search terms. In the screen shot, the main part of the action is the only part that shows the Search box. All of the other parts are turned off.

What PowerGREP does with the main search term of your action depends on the "action type" that you've selected at the top of the Action panel. All action types except "list files", "file or folder name collect" and "merge files" need at least one search term in the main part of the action.

The action type also determines whether the main part of the action shows a second box to enter a replacement text or a text to be collected. The "search and replace" and "rename files or folders" action types need a replacement text to replace search matches with. The "collect data" and "file or folder name collect" action types need a text to be collected.

Exactly what PowerGREP does with the search term(s) in the main part of the action is described in detail in the topic about action types. Normally, the main search terms are used to search through the contents of the files. The "file or folder name search", file or folder name collect", and "rename files or folders" action types use them to search through the names of files instead.

The search term(s) can be literal text, binary data, or a regular expression. You choose this through the "search type" setting. If the search term is a regular expression, the replacement text or text to be collected uses the replacement string syntax with backreferences from the regular expression. Otherwise, the replacement text or text to be collected is also literal text or binary data.