Alteryx Designer Desktop Discussions

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

Trouble with looping through multiple files

Madden101
5 - Atom

Hello,

 

I am a new user of Alteryx, and am trying to figure out a way to create a workflow that will essentially loop through a folder with various shapefiles. 

Basically I have a folder with 50 or so shapefiles that have different extensions in a file explorer (i.e .shp, .dbf, .shx etc) - all shapefiles with the same fields (were just extracted from an original), and need to do some data preparation before I can use them in an analysis. I would be running different tools such as summarize and different formulas in my workflow.

HOWEVER, I have been trying to read these files from different directories, dynamic input etc but nothing seems to work and it gets very confused. For the directory I get errors such as "cannot read XXXXXXX/XXXXX/XXXXX.shx file". I also am struggling with creating batch and/or iterative macros. I have watched some of the videos but do not understand the process.

 

Any ideas on how I can read these could be solved? Thanks!

 

 

1 REPLY 1
Philip
12 - Quasar

Hi @Madden101

 

Attached is an example of how to do this.

 

Notice in the Directory Tool, I set it to read *.shp because each group creates a single shapefile. When Alteryx reads in the .shp file, it also pulls in the .dbf and all related files. 

 

You will probably have to change the folders the Output and Directory Tools point to for it to work. Let me know if you have any questions or need additional help.

Labels