PSPad: Great Text File Audit Tool

PSPad is a great text editor and search tool, so by default, it’s a great audit tool, and it’s free. It can also handle a million lines of text–literally. Are you interested yet? It is also a great file diff/compare tool I’ve ever seen.

PSPad works with text files, such as those ending in TXT or CSV, or any text-based file (like an ini file). It works with DOC files too.

I’ll explain how to do the following with PSPad:

  • Search a file (find all lines containing X)
  • List all occurrences/matches of a search term
  • Export a list of occurrences
  • Compare 2 documents (diff)
  • Download & install PSPad

Simple Search (find all lines containing X)

  1. Open the file using File > Open. The file’s text is shown in the box at the top of the screen.
  2. Make sure you’re at the top of the file (press the Control + Home keys).
  3. From the menu bar, select Search > Find.
  4. Type the search phrase in the Find dialog box, and click the OK button.
    In the screenshot below, I searched for “ben”, which is highlighted. Notice that the line that the cursor is in is displayed in yellow.
  5. To find the subsequent occurrence, press the F3 key.
    PSPad Simple Search

To view a larger image, click the image.

Create a List of Matched Items

  1. Follow steps 1-3 under Simple Search.
  2. Type the search phrase in the Find box, and click the List button (instead of the OK button). See screenshot below.
    PSPad Search Matches
  3. To view all the matches, look in the Search Results tab at the bottom of the screen. See the red arrow in the screenshot below. Notice that 2 occurrences of “ben” were found: Ben and Benjamin.
    PSPad Search Match Results
  4. To scroll through the matched data, click in the Search Results tab, and use the up and down arrow keys. In the Search Results tab, the numbers to the left of the data are the line numbers in which the data is found in the original data shown in the top box (in this example, the 5th and 7th lines).
  5. To see where a matched line occurs in the original data, double-click the matched line in the Search Results tab. The corresponding line will be highlighted in the top box. This is helpful when you want to review the data immediately before and after the matched data for further insights.

Export a Matched List (Search Results)

  1. Create a list of matched items using the procedure immediately above.
  2. Click in the Search Results tab
  3. From the menu bar, select File > Export > Export. Name the file, select the format, and click OK. Since the format selections are limited, I usually choose RTF and then open the file in Excel or Word as needed.

Diff (Compare 2 Documents)

To determine the differences between 2 documents:

  1. From the menu bar, select File > Open to open the first file to be compared.
  2. Select Tools > Text Differences > Text Diff with This File… and select the second file.
  3. Note the differences between the files in the screenshot below:
    • Green lines indicate lines that have differences (in the example, the age is different: 31 vs 99).
    • Pink lines indicate lines that are in one file, but not in the other.
    • Granted, it doesn’t pinpoint the exact differences, but it’s easy to find them.

    PSPad File Diff

Also, the quickest way to do a diff (when both files are in the same directory) is to highlight both files, right-click the files, and select PSPad TextDiff. A screen similar to the box above will appear.

PSPAD Compare Files

Download & Install PSPad

When I first started using PSPad, it was easy to download and install. Now, it’s a little more complicated, and if you’re not careful, installation also includes other applications you don’t want, so follow these instructions carefully. Trust me, this tool is worth the hassle.

To download PSPad, go to http://www.pspad.com/en/download.php (English version) and click on the “Installer” link — make sure you don’t click the big DOWNLOAD button, which downloads something else. After download, double-click the installer and follow the prompts, EXCEPT I suggest:

  • On the Select Components screen, select Compact Installation (it’s in a grey dropdown box, immediately above all the options you can select). You can perform all the tasks described in this post using the options in Compact Installation.
  • On the Select Additional Task screen, uncheck the box that says “Register PSPad as default for TXT files”. Otherwise, all TXT files will open in PSPad when you double-click them.
  • On the InstallManagerSetup screen(s), uncheck all the Claro browser toolbar options and click Decline. Also Decline the offers to install PriceGong and then RegClean Pro.

Tips

  • Yellow lines indicate the position of the cursor.
  • To close a file, double-click the tab.
  • Explore all the options, as this is a POWERFUL tool!

Now take your largest text files and watch how fast they load, and how quick the search capabilities are. Enjoy!

For other tools I like, see My Favorite Windows Software

Leave a comment

Filed under Audit, Free, How to..., Security

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s