Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

In Need of Batch File Assistance 1

Status
Not open for further replies.

smr

MIS
Dec 8, 1999
3
US
I am rusty at Batch Files and need to create a DOS batch file that tests for errorlevels 0-3 takes the following action, and then ends.
(a) Display the DOS version if errorlevel 0
(b) Give the tree command if errorlevel 1
(c) Give the chkdsk command if errorlevel 2
(d) Display the time if errorlevel 3
(e) Ends if errorlevel is 4 or greater


I seem to run into trouble with the errorlevel 0 - throws my whole file off.

Can anybody help?
 
There is no errorlevel 0 available to user. In choice command first key listed is EL1.
And at the 6.22 level there is no choice if EL 4 or greater, only choices are the error levels specified by the number of keys specified as valid. Ed Fair
efair@atlnet.com

Any advice I give is my best judgement based on my interpretation of the facts you supply.

Help increase my knowledge by providing some feedback, good or bad, on any advice I have given.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top