Convert Files in Proprietary Formats to Plain Text

PowerGREP can convert files in many proprietary file formats to plain text in order to search through them. Many examples earlier in this section explain how to set this up. This example assumes you’ve already done so.

If you need to process these files with other applications that can’t read their proprietary formats, use PowerGREP to convert the files to plain text, and then use the other applications on the converted files.

  1. Select the files you want to convert in the File Selector.
  2. Make sure “file formats to convert to plain text” is set to a configuration that allows PowerGREP to correctly read the text in all those files.
  3. Start with a fresh action.
  4. Set “action type” to “list files”.
  5. Leave the Search box blank to convert all files you selected in step 1.
  6. Set “target file creation” to “convert copies of matched files to text”.
  7. Set “target file destination type” to “single folder” or “folder tree”.
  8. Click the (...) button next to “target file location” to choose the target folder. Or enter the path to a new folder which PowerGREP will create when you execute the action.
  9. Set “target file text encoding” to an encoding supported by the application you want to process these files with. Choose Unicode if supported by the target application as Unicode supports all characters. In this situation, “same as original file” means the encoding used by PowerGREP’s plain text conversion (which is UTF-16LE for most formats) rather than the encoding used by the original file’s proprietary format.
  10. Set “target file line break style” to the line break style that the converted files should use. Choose CRLF if you’ll process the files on Windows. Choose LF for UNIX, Linux, or OS X.
  11. Set the backup file options as you like them.
  12. Click the Convert Files to execute the conversion.

Doing this conversion is also useful if you will be repeatedly searching through the same set of files and the files are too large to fit in PowerGREP’s conversion cache. It’s even more useful if many people on your network are searching through the same set of files, as the conversion cache is not shared between PCs. This way, the conversion needs to be done only once. Converting files from their proprietary formats to plain text usually takes much longer than searching through that plain text.

When PowerGREP is the target application, set “target file text encoding” to UTF-16LE. Also make sure that “text encodings to read files with” has the option “write a byte order marker at the start of Unicode files” turned on for the default settings and all format specific settings. The predefined “generic auto detection” configuration does this. This ensures that all the converted files use UTF-16LE with a BOM. These files support all characters and PowerGREP will always read them correctly due to the BOM, regardless of the text encoding configuration used when searching through these files in the future. Set “target file line break style” to “same as original file” as PowerGREP handles all line break styles automatically.

When there are new or modified files to be converted, you can repeat the action to convert just the modified files. To do this, set “file modification dates” in the File Selector to “modified on or after”. Set the date to the day you last ran the conversion.