Free Trial

Alteryx Designer Desktop Discussions

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

Check if all files inside a folder is in .zip

Ultralightbeam
8 - Asteroid

Hello guys i have an excel file where it has all records of data location on our NAS drives, I want to check if the files inside the folder are in zip file. How can i do it?

 

so for example excel files row contains this

C:\Users\PC\Desktop\Folder1

 

So want to check files inside Folder1 is in zip file.

2 REPLIES 2
AngelosPachis
16 - Nebula

Hi @Ultralightbeam ,

 

You can create a batch macro that will read the different rows from your excel file which then will be fed in your control parameter.

 

The batch macro itself will include a directory tool, the fullpath of which will dynamically change based on the tows of your excel file. For each one of your rows, the directory tool will return the different files in each filepath. You can then parse the filetype from either the Filename or Short Filename columns, group on it and count how many files of that type exist.

 

Hope that helps,

Angelos

danilang
19 - Altair
19 - Altair

Hi @Ultralightbeam 

 

The main problem that you have here is finding out the files contained in the zip file, without extracting them.  The ZipMetatdataReader macro from this post uses a Python tool to read the file names contained within the archive.  Compare this list with the list that you can get with Directory tool.  

 

Dan

Labels
Top Solution Authors