I see answers here to parts of my question, but none that covers it all together. Apologies if I missed one.
Here's what I have: A batch file that calls out other batch files, deletes the files at the end, and reboots the computer. I am using this for certain configs on new machines I set up. Right now, I have to select multiple files, throw them on the new desktop, and run them there.
I modified the batch to run these out of a single directory that I place on the desktop, and it deleted the folder when it's done, but it's lost the ability to reboot. Here are the last 3 lines:
cd C:\Users\XXXX\Desktop
RD /S /Q "C:\Users\XXXX\Desktop\YYYYYYYYY"
shutdown -r
(del %0)
What is the best way to execute this? Do I create a new batch file designed to do nothing but the last 3 actions above(I listed the first one because I assume I have to get out of the directory first to delete it)? If so, does it really just have to be those three lines? Like the first action run would be to copy the file in question to the desktop and then execute it as the last action after changing the directory?
Sorry if I made this post too wordy, just trying to provide as much detail as possible.