In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Delete Files then Folder using Python

pinedz04
5 - Atom

Hi!

 

I'm trying to create a workflow that will delete the files first then the folder used if its empty using Python.

 

I am having a hard time connecting my directory in the workflow. I'm not sure how Alteryx.read works and if i should be using a macro for the python tool.

 

I also don't want to use shutil.rmtree to avoid unnecessary deletion of files.

 

I've attached the workflow of what i want or what i have.

 

Thank you!

2 REPLIES 2
dougperez
12 - Quasar

Why don't you use a batch to delete the files and folders? You can create the batch into the workflow and then run that.

ArtApa
Alteryx
Alteryx

Hi @pinedz04 - Run Command Tool: https://help.alteryx.com/20212/designer/run-command-tool 

 

Just saying...

Labels
Top Solution Authors