Write more than one line of script to Run Command tool
- 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'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.
- Labels:
- Run Command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@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.
