Hello All,
Currently i have a requirement, where all the downloads we are getting in ZIP file and the name of the ZIP file and the File underneath(CSV) are upended with date and time, the prefix name always stays same. when i used Dynamic tool, I have to give in formula the complete file name (Fullpath + Filename.CSV) other wise it's failing to fetch the correct file and it's giving error. So I need help in solving this Puzzle
Solved! Go to Solution.
Hi,
If you could share any sample zip files, so I can develop the workflow, as per your file names.
Give the attached macro a try. This is only a portion of the problem, but it's a start.
I had this same issue trying to download campaign files from Bing (Don't judge!)
Here's the steps
It will look something like this:
Finally, I didn't create the macro, and I can't remember where I found it. It's all based on Python code that you care quickly parse to see what's happening.
Good luck!
--
agree with @smoosh - break the problem down into smaller steps, get the directory of files first, then you can extract the ones you want.
The other option is to unzip the files - if you google this, a few folk have used a snippet of Python within Alteryx to unzip and then this becomes much easier to work with.
Thank you @smoosh @SeanAdams , it worked for me
Thank you for this, this helped me a few months after the post. Question though, the macro gives me the error "Error: ZIP Metadata Reader (3): Record #11: Tool #8: The field schema for the output "Output8" changed between iterations."
Do you know why this might happen? it works if one file is outputted but since its a directory with multiple files, I get this error.
Without seeing the files, I can only guess. But I'm thinking that the files within the Zip archive are different. Something like:
File One
Name, Date, OrderID
FileTwo
Product, Date, OrderID
etc.
Each file has to be the same in order for the process to work. I'd start there.