Delete bat files after running batch macro
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Labels:
- Batch Macro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@45179902
I think we can use the Run Command After Run option in the worflow.
I mean use something like "Del xx.bat"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@45179902 - The attached workflow deletes Test.csv from downloads. You will need to change a path.
