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