Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Delete zip files

wolfgangh
8 - Asteroid

Hi all,

 

my workflow is downloading zip files and pulling the data in Alteryx databases. Is there a way to delete the Zip files after the databases are filled?

 

Thanks and best regards,

Wolfgang

7 REPLIES 7
fmvizcaino
17 - Castor
17 - Castor

Hi @wolfgangh ,

 

Yes, there is a way!

Take a look at this link https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Tool-Mastery-Run-Command/ta-p/31548 

It teaches you how to use run command to various things, you of each, exactly what you want.

 

"Using batch files/commands (IntroductionPart 1Part 2Part 3 - these files/scripts are often used to move/delete/zip files and folders or interact with FTP)"

 

Best,

Fernando Vizcaino

wolfgangh
8 - Asteroid

This is a really good idea. The only issue I can not come across is on how to get a relative path in the batch file.The user is unpacking the workflow package in any folder, so how do I get the destination directory into my batch file?

fmvizcaino
17 - Castor
17 - Castor

Hi @wolfgangh ,

 

You could use the workflow directory constant to build your batch file.

fmvizcaino_0-1581537184035.png

 

Best,

Fernando Vizcaino

 

wolfgangh
8 - Asteroid

That is the right way to go. I will use an interface tool to update the value.

 

Do you have an idea, how I can get workflow directory with the expression editor written out?

 

I can not get it to work

fmvizcaino
17 - Castor
17 - Castor

Hi @wolfgangh ,

 

Would you be able to show your idea, as I'm thinking, you don't need to use a action tool, but maybe I'm not seeing the whole picture.

 

Best,

FErnando Vizcaino

wolfgangh
8 - Asteroid

I basically need the workflow directory in the text input, so that I can update the link in the batch file. Thanks for your help

fmvizcaino
17 - Castor
17 - Castor

@wolfgangh ,

 

I think it is better to use the constant in a formula tool. One idea is for you to include it in the string you are building inside your formula tool. Another one is to use a replace function where you change something for the workflow directory constant.

 

Did that make sense?

Best,

Fernando Vizcaino

 

Labels