You can simply use a CALLed subroutine if you are worried about SHIFT trashing the %0 value. It takes time for the delete process to initiate and execute, so the parent script has a chance to terminate cleanly before the delete happens. This can easily be done using START /B to launch a delete process. The trick to deleting the file without an error message is to get another hidden process to delete the file after the script terminates. But it is very undesirable if the console remains open after the script terminates. Npocmaka's answer works, but it generates the following error message: " The batch file cannot be found." This isn't a problem if the console window closes when the script terminates, as the message will flash by so fast, no one will see it. (might not work if SHIFT command is used)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |