Thread: batch help
View Single Post
Old 11-08-2008, 09:45 PM   #2 (permalink)
mikesgroovin
mikesgroovin's Avatar
 
HONK if you route packets

Join Date: Sep 2003

Posts: 4,664

mikesgroovin will become famous soon enoughmikesgroovin will become famous soon enough

Default Re: batch help

pipes dont agree directly after echos

It was erroring out at line 5 (first pipe), took that out and then it errored elsewhere. I took out your entire "Title" (lines 4 through 13) and the batch file paused at a option like you wanted.

just by browsing over your batch file quickly, you may want to download crimson editor .. it's free and handy. Also, launch a shell first rather than placing your file name in the run prompt... that way it wont close upon exit, unless you call "exit"

IMO Creating useful batch files takes time... worry about the "meat and potatoes" of what you want to do first rather than waste time on a "title screen". Menus are great, just all the stuff above it... lol

EDIT: Another tip... using a /I switch right after "If" allows you to rule out case sensitivity...
So:

Code:
if %network%==F goto syntaxnetstat
if %network%==f goto syntaxnetstat
becomes

Code:
if /I %network%==F goto syntaxnetstat
It covers lower and upper cases
__________________
A+, Net+, Sec+, Server+, Linux+, MOUS(2000 & '03), MCSE, MCSA, MCT, CNA, CCNA, CCDA, CCNP, CCSP

Last edited by mikesgroovin; 11-08-2008 at 09:55 PM.
mikesgroovin is offline