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.
Hi @45179902 - You can use a Run Command tool:
- https://help.alteryx.com/current/RunCommand.htm
- https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Tool-Mastery-Run-Command/ta-p/31548
@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.
@45179902
I think we can use the Run Command After Run option in the worflow.
I mean use something like "Del xx.bat"
@45179902 - The attached workflow deletes Test.csv from downloads. You will need to change a path.