Alteryx Designer Desktop Discussions

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

Delete bat files after running batch macro

45179902
8 - Asteroid

I've built a batch macro that will feed some scripts from a text input tool to create a temporary .bat file to copy files from one folder to another. Each run will copy roughly 100 files. The problem is that after the run is completed, the .bat file remains in the folder, which is not something that should remain. How do I delete the .bat file after running the workflow? I want the file to be deleted after the last copy command is processed.

4 REPLIES 4
45179902
8 - Asteroid

@ArtApa I know I can use a Run Command tool. Could you demonstrate how this can be achieved? I don't have experience writing self delete CMD commands.

Qiu
21 - Polaris
21 - Polaris

@45179902 
I think we can use the Run Command After Run option in the worflow.
I mean use something like "Del xx.bat" 

Untitled1A.png

ArtApa
Alteryx
Alteryx

@45179902 - The attached workflow deletes Test.csv from downloads. You will need to change a path.

Labels