In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!

Alteryx Designer Desktop Discussions

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

How to Download a zipped file from a website using the Download Tool

grodriguez
7 - Meteor

I am trying to download the zipped file at the below link but am having trouble with the regular expression in the RegEx tool. Any suggestions would be greatly appreciated. 

I found a discussion with a similar issue but the link that they were using does not work so I cannot use it as an example to see how they pulled the expression. Attached is the workflow I have so far. 

 

https://www.cms.gov/research-statistics-data-and-systems/statistics-trends-and-reports/mcradvpartden...

 

 

14 REPLIES 14
Felipe_Ribeir0
16 - Nebula

Hi @grodriguez 

 

The actual URL of the file just varies with month-year, so you can build your URL using formulas like this one and download it:

 

URL.png

 

grodriguez
7 - Meteor

I'm slightly new at this and may be missing something but what you implemented above did not download the files from the site it just created a table with the URL, OUTPUTPATH, and DownloadHeaders fields. 

grodriguez
7 - Meteor

@Felipe_Ribeir0 I'm slightly new at this and may be missing something but what you implemented above did not download the files from the site it just created a table with the URL, OUTPUTPATH, and DownloadHeaders fields. 

Felipe_Ribeir0
16 - Nebula

Hi @grodriguez 

 

The downloaded file will be placed on the OUTPUTPATH. Just configure the output path to a valid path in your machine, run the workflow and the zip file will be placed there.

 

 

grodriguez
7 - Meteor

@Felipe_Ribeir0 how do I configure the output path? I've tried with both a formula and an output tool and its not working. Here is an example output location \\san02\alteryx\uat\gabriella\ 

Felipe_Ribeir0
16 - Nebula

@grodriguez 

 

Inside of the input text tool:

 

outputpath.png

grodriguez
7 - Meteor

@Felipe_Ribeir0 

That worked! Thank you!

However, I would need to run this job yearly with our scheduler, where the file name will change. I don't believe this workflow will work since the OUTPUTPATH contains the exact name of the current file. Is there a way to configure that so it pulls the new file name each time it runs? 

Felipe_Ribeir0
16 - Nebula

@grodriguez 

 

You can build the filepath using the formula, check the attached workflow:

 

outputpath.png

grodriguez
7 - Meteor

@Felipe_Ribeir0 

Oh ok that makes sense! You are the best!

Is it possible to unzip the file with Alteryx or will I need to install an unzipping tool? 

Labels
Top Solution Authors