The Alteryx Community is a finalist in three 2026 CMX Awards! Help us win Customer Support Community, Most Engaged Community, and User Group Program of the Year - vote now! (it only takes about 2 minutes) before January 9.
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Unzipping Massively XML Files

Cfdiaz2103
8 - Asteroid

Hello community,

 

Have you ever created a workflow to read XML Files from Zip Folders? I would like to replicate the following process in a macro:

1. Open Directory

2. Filter Zip Files

3. Open and Filter XML Files

4. Extract Data from XML File

 

Any tip will be much appreciated.

 

Thanks,

Carlos

9 REPLIES 9
terry10
12 - Quasar

 

 

 

Capture.PNG

Yoshiro_Fujimori
16 - Nebula
16 - Nebula

Hi @Cfdiaz2103 ,

 

I think the step to unzip the files is a tricky part, as ( I understand ) there is no tool to unzip.

So you would need to generate a .bat file to run unzip command with Run Command tool.

If you can get the list of files in Zip folder from Run Command tool output anchor, you may pass it for the next step.

Good luck!

Yoshiro_Fujimori
16 - Nebula
16 - Nebula

@terry10 ,

Oh I did not know this.

Thank you for the information. I got a lesson :)

terry10
12 - Quasar

Happy to help!

apathetichell
20 - Arcturus

AFAIK reading.zip files with the input data is useful IF you know the names of the files inside the zip file. I do not believe you can natively parse contents of a zip file to extract filenames... I'd use Python for that - and then may as well use Python to read in the files as well. Depending upon how nested your XML elements are you may have issues with the xml tool. 

Cfdiaz2103
8 - Asteroid

@terry10 Hi Terry,

 

I tried to do so with one single Zip File and it works fine, but then after converting that workflow into a macro, in order to make the same process for several files, it drops this error:

Record #1: Tool #1: No file specified in zip/gzip archive: "C:\Path\Sample File.zip". Choose a file to read.
 
Let me know if you have other method.
 
Thanks!

 

apathetichell
20 - Arcturus

@Cfdiaz2103 read my comment. you can extract files from a .zip file - you can change the file name you are extracting if you set up your actions tools correctky, You cannot extract files without knowing the name of the file in the archive. This is not impossible - just not implemented in Alteryx.

Cfdiaz2103
8 - Asteroid

@apathetichell Hi,

Sorry, I hadn't noticed your comments.

 

I'm not sure if I set correctly Action Tool to dynamically change File Names

 

Screenshot - Action Tool Configuration - 2024-06-05 123554.png

Screenshot - Select Xml file - 2024-06-05 123445.png

Screenshot - Input Data Tool Configuration -  2024-06-05 123634.png

 

Let me know if I'm doing something wrong.

 

Thanks,

apathetichell
20 - Arcturus

you must pass in a value of zip file full path|||filename to extract

Labels
Top Solution Authors