Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Reading Files from the given folder

Krish
8 - Asteroid

Hi ,

 

I have the following requirement.

 

I have error log folder like this:

 

C:\Data\App1\Error

 

Record1.Error

Record2.Error

 

I have to read the above folder for all .error files and I need to create temp table like this so that I can update against my db table.

 

RecordName   Status                      Error_Desc

Record1           Load Error             Content of the Record1.Error file

Record2           Load Error             Content of the Record2.Error file

 

Could you please provide me a direction on which tools can be used to solve this.

 

Thanks in advance.

Krishna

 

6 REPLIES 6
pcatterson
11 - Bolide

I'd use a directory to identify all the files in the desired folder and a filter to identify only the correct files within there that you want.  Then using the dynamic input tool, to pull in all the relevant data.  From there, you can use it in the remainder of your workflow.

NicoleJohnson
ACE Emeritus
ACE Emeritus
Try the Directory tool - set it up to connect to all files in the folder using "*.*" as your file name (or "Record*.xlsx" for example if you only wanted the Excel files that started with "Record")... It will bring in the file names, full path, etc. which you can then feed into a Dynamic Input tool. Connect to one file as a template in Dynamic Input, and then indicate that the tool should replace the file name based on the field containing the file names from the Directory tool.

Let us know if that gets you headed in the right direction or if you need more assistance with configuration, etc.? :)

Cheers,
NJ
Krish
8 - Asteroid

Thanks for your update!

But I am using 10.5 version and could not open this now. 

I could not upgrade immediately as it requires lot of process involved.

Is there any way I can have 10.5 version solution?

 

 

pcatterson
11 - Bolide

You should be able to open the workflow in notepad it will look like XML code.  To be able to open it in 10.5, change the version on the second line from 11.0 to 10.4:

 

<?xml version="1.0"?>
<AlteryxDocument yxmdVer="11.0">
  <Nodes>

 

<?xml version="1.0"?>
<AlteryxDocument yxmdVer="10.4">
  <Nodes>

Krish
8 - Asteroid

Thanks for that tip.

This helps a lot.

 

pravinpande
6 - Meteoroid

How about if I want to select latest file based on certain text?

Labels