0 votes

I want to find a pattern (e.g. URLs or email addresses) in a group of files and then export that information as a list in a text file. Can I do that with FileLocator Pro?

by (715 points)

1 Answer

0 votes

Yes you can. Basically you search for the the pattern using regular expressions and then use the Keyword Summary report to display the unique hits.

Step-by-step instructions

  • Use the following regular expression (taken from RegExLib.com) to search for URLs in your files (email and credit card regular expression patterns included at end of answer) :

URL Search

  • Click on the Reports tab and change the Report to be the Keyword Summary report to view the unique URLs:

Keyword Summary

  • You can then use the standard reporting functionality to either copy, print, or save the URLs.

Note: By default the Keyword Summary report will display other columns. To switch off those columns just click on the Report Options button and choose only the Keyword Hit column:

alt text

Exporting list of email addresses

You can use the same method to export a list of unique emails from a group of files. Simply change the regular expression used above to something like this:


Exporting list of credit card numbers

For credit card numbers change the regular expression used above to something like this:

\b(\d{4}[ -]?){4}\b

Older Versions: The Reporting tab was added in FileLocator Pro version 7 but you can achieve similar results with earlier versions of the program using the Exporting feature and the custom format unique_hits_only.xsl, stored in the Sample Transforms folder. After the initial search follow these steps:

  • Choose File->Export Results... to export the results

  • Select the 'Custom (XSLT)' format option

  • Browse to the Sample Transforms folder and pick the file: unique_hits_only.xsl

Export Unique Hits

  • Click the Export button
by (31.5k points)