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

Alteryx Designer Desktop Discussions

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

Open multiple zip files in Alteryx

tanvir_khan
8 - Asteroid

Hi all:

 

I need to open multiple zip files from a directory and analyse the data. Input tool can open multiple excel files by using wild card [*] but it can open one zip at a time.

 

I've found a suggestion but it's not working for me. Need your help. 🙂

tanvir_khan_0-1618962229481.png

 

Thanks!

3 REPLIES 3
danilang
19 - Altair
19 - Altair

Hi @tanvir_khan 

 

The Dynamic Input can open multiple zip files, but the filenames within the zip file need to be the same.  If you have dynamic file names, look at the solution offered here. It uses the Python Tool to read the list of files contained within the zip file.

 

Dan

tanvir_khan
8 - Asteroid

Hi @danilang thanks a lot for sharing the post. 

I'm trying the ZIP Files Metadata Extractor and Reader.yxzp as the file names are different in my case. But i'm struggling a bit to configure it. 

 

tanvir_khan_0-1619064330778.png

 

1. Directory - I've set the input file location and specification as *.zip

2. Filter1 - I've changed the condition as OR instead of AND as I've got zip files only

    Contains([FullPath],"Archive")
    OR 
    Contains([FullPath],".zip") 

3. ZIP reader - left as it is

4. Filter2 - no clue how to configure this

    Contains([FilesList],"Customer")
    AND
    Contains([FilesList],".csv")
    AND
    !Contains([FilesList],"MACOSX")

5. Formula1 - "FilesToRead" didn't get the use of it as well

 

Can you pls help me configure the flow if possible. 

 

Thanks!

danilang
19 - Altair
19 - Altair

@ hi @tanvir_khan 

 

The second filter is used to pick which files to input from the zip file.  The configuration that you have loads all .csv files that contain "customer" in the name.  The !Contains([FilesList],"MACOSX") removes the special MACOSX files that can be in some zip files so leave that clause in the filter.  You'll have to configure the other 2(or more as required) clauses so that they match the files in the zip archive that your trying to read.  Examine the file list that comes out of the 1st macro and see if you can find some kind of pattern to the file names that you want to read.

 

Dan

Labels
Top Solution Authors