Alteryx Designer Desktop Discussions

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

Adding Files to Batch Workflow from Multiple Directories

macst245
8 - Asteroid

Hello, I have a workflow I want to turn into a batch macro to run multiples files through one at a time if that is the best way to go about this.  I have the workflow attached and the two zip files from which I need the files run through the workflow.  This workflow will be comparing data from the current month to data from the previous month and I need the workflow to match up the data based on the file name.  For example, I will need the File A from the current month to be compared with the File A from the previous month, then File B from current month to be compared to File B from the previous month.  If there is no match in file from current to previous, I would need that file to be skipped and not run through the workflow.  If I can clarify anything please let me know.

 

 

8 REPLIES 8
gabrielvilella
14 - Magnetar

What exactly you don't know how to do?

macst245
8 - Asteroid

@gabrielvilella I'm not sure how it's possible for me to input the excel input files into the workflow and have it properly output what I need i.e. File A matching up with File A, and File B matching up with File B.  Then having those files go through the workflow.  

gabrielvilella
14 - Magnetar

The easiest way is to have the date in the file name. You get, for example, the maximum date for each file, then remove one month from it, now you have the two file names you need to compare, then just read them to compare.

macst245
8 - Asteroid

@gabrielvilella Thanks, but I am not able to change the input file names as they come in and cannot be changed.  

gabrielvilella
14 - Magnetar

How can you identify if the file is from current month or previous month? 

macst245
8 - Asteroid

@gabrielvilella  They are saved in different folders, one is titled current month and the other is previous month.  

gabrielvilella
14 - Magnetar

Maybe this is what you want. I did what I could there, I don't have the threshold file to test the macro.

macst245
8 - Asteroid

@gabrielvilella Thanks, I think that's what I'm looking for.  I'm going to have to do testing and see for sure, but it looks good.  

Labels