Action to pull in contents of a text file

(imported topic written by SystemAdmin)

I am trying to do exactly what title says: see if a particular file is present on the machine and pull its contents into an analysis job. We’ve done this successfully with XML files using BF’s native XML inspector, but this file is plain text, and a messy one, too. I know I can just pull in the file with UploadManager, and I have successfully done so, but the end result is not optimal, as the data is not shown in the console or Web reports.

I guess, if the above is not possible, can I just parse a contents of the file for a string and then make that string a retrieved property or a property for analysis job, so it could be pulled into the console and displayed there or in Web Reports?

I searched quite a lot and haven’t found a way to do it, so any help would be appreciated.

Thanks!

D

(imported comment written by SystemAdmin)

Yes, create an analysis and parse for whatever you are specifically searching to find. This has the added benefit of not needed to deal with potentially thousands of large files that would otherwise be pulled back for parsing.

The analysis properties can be simple or complex depending on your needs. Here are some samples to get you started.

content of file “drive:\path\file.ext” contains “Some unique value I’m searching for …”

or

lines of file “drive:\path\file.ext”

or

lines whose (it contains “search value”) of file “drive:\path\file.ext”

You can further qualify by any additional criteria necessary (perhaps file date, size, type, etc.).

1 Like