Akostech
asked on
Batch File Proccessing
I have a master batch file that calls a sub batch file to to check OS version. EX:
@Echo off
Echo Checking for Updates
Set SourceDrive=f:\backup
net use u: /delete
del \\JAXBACK02\f$\backup_logs \%Computer Name%.txt
del \\JAXBACK02\f$\backup_logs \%Computer Name%_rsyn c.log
net use u: \\jaxback02\u$\%computerna me%
Call \\jaxback02\f$\backup\os.b at
The sub batch file reads:
ver | find "Version 5.2" > nul
if %ERRORLEVEL% == 1 goto Win2k
:Win2k
Call "\\jaxback02\f$\backup\rsy ncDc.bat"
goto theexit
Once the OS versions is determined to be Win2k then a nother script runs This all works well except after the sub batch file runs, the maaster batch file continues to process. I want all processing to stop once the sub is called.
@Echo off
Echo Checking for Updates
Set SourceDrive=f:\backup
net use u: /delete
del \\JAXBACK02\f$\backup_logs
del \\JAXBACK02\f$\backup_logs
net use u: \\jaxback02\u$\%computerna
Call \\jaxback02\f$\backup\os.b
The sub batch file reads:
ver | find "Version 5.2" > nul
if %ERRORLEVEL% == 1 goto Win2k
:Win2k
Call "\\jaxback02\f$\backup\rsy
goto theexit
Once the OS versions is determined to be Win2k then a nother script runs This all works well except after the sub batch file runs, the maaster batch file continues to process. I want all processing to stop once the sub is called.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
that worked like a charm
For instance check the errorlevel the os.bat sub batch returns and exit or not based on that?
"if %ERRORLEVEL% == nn EXIT"