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
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!
Happy to help!
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.
@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:
@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.
@apathetichell Hi,
Sorry, I hadn't noticed your comments.
I'm not sure if I set correctly Action Tool to dynamically change File Names
Let me know if I'm doing something wrong.
Thanks,
you must pass in a value of zip file full path|||filename to extract