I'm trying to write the following two lines of scripts to the Run Command tool:
MKDIR "directory"
del "%~f0" & exit
The first line of script will create a directory (folder), and the second line of script will self destruct the created .bat file. I continue to get an error (error code: 1), but I don't understand how to fix it.
del "%~f0" & exit
works in another Run Command that I wrote.
Please help!
Solved! Go to Solution.
Please see the config below. Also Solution Attached. The Bat creates a Directory then self destructs on my machine. No issues.
Please let me know if you are able to implement on your end. If so, please consider marking this as the solution to help other community members identify the solution faster in the future.
@csmith11 Awesome! You saved my project ~ I guess I did something wrong in configuration, but I don't remember how exactly I configured the .bat file as it apparently didn't accept more than one line of scripts.
@45179902 I must thank you as well. I didn't know it was possible to have a Bat file delete itself. Very clever solution! I'll be implementing it in future projects as well.