Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Search zip of .txt files for a key word

jamiesarubbi
5 - Atom

Hello, 

 

I have a zip of a few hundred .txt files of job history and I'm trying to find which of those files have the failed by trying to find keywords such as "error" and "fatal". I've been able to upload the zip and chose the output to be csv but can't find how to search the whole set for keywords.

Thanks

4 REPLIES 4
mbarone
16 - Nebula
16 - Nebula

I think a batch macro would be the way to go on this.  Are you familiar with batch macros?

jamiesarubbi
5 - Atom

I'm not, I started reading about regular macros but not sure how to use batch macros

mbarone
16 - Nebula
16 - Nebula

Do you have a workflow built that does what you want for one particular file?  That would be the first step.  

ruship
Alteryx Alumni (Retired)

Hi Jamie, 

 

Closing the loop here - I also sent you an email. 

 

Here is a quick example that might do the trick. You would use this macro with a directory input pointing to your unzipped folder of log files. The output is a list of all the files with greater than 0 instances of either "error" or "fatal." 

 

The control parameter makes it a batch macro. In this case, it is running this workflow against each file path.  

thumbnail_image.png

Labels