I've been ripping my hair out all afternoon trying to figure out what I'm doing wrong. When I call certain executables (the most flagrant of which is 7z from 7-zip) my batch scripts seem to abruptly terminate after that call, resulting in the rest of the code not getting executed. There are no error messages, etc: the script execution just stops.
Do any of you Windows gurus know what would cause an upper-level batch script to stop executing, and how to suppress it? I hazard it has something to do with error codes, but alas, my google-fu isn't powerful enough to divine the answers to my problems (batch documentation is horrendous!)
[SOLVED] Batch file abruptly terminating
Moderator: General Moderators
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
[SOLVED] Batch file abruptly terminating
Last edited by Ambush Commander on Sun May 06, 2007 7:07 pm, edited 1 time in total.
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
Here's an alternate solution:
Much more elegant.
Code: Select all
call command