noble_aloof Posted May 3, 2009 Share Posted May 3, 2009 i'm running xp. im trying to create a simple file to ping my router. what i need to do: have the user define a variable have this variable work heres what i have so far @echo off title testing network echo please enter ip adress rem this is where the user of the batch file should set the varible %ip% (i have no idea how to get the user to input a variable) pause pinging %ip% ping %ip% -w 1 echo done pause exit i've looked all over online.. i cannot figure this out. please help [size="5"][font="Georgia"][b]Staking:[/b][/font][font="Palatino Linotype"][color="#FF0000"][/color][color="#FFFF00"][/color][color="#00FF00"] 4+ mil[/color][/font] [font="Georgia"][b]Current Status:[/b][/font][font="Palatino Linotype"][color="#FF0000"][/color][color="#0000FF"] Training defense [/color][/font][/size] Link to comment Share on other sites More sharing options...
MageUK Posted May 3, 2009 Share Posted May 3, 2009 Try something like this: @echo off title Testing Network echo Please enter IP address... SET /P IP=[iP] pause echo Pinging %ip%... ping %ip% -w 1 echo Done pause exit Link to comment Share on other sites More sharing options...
noble_aloof Posted May 3, 2009 Author Share Posted May 3, 2009 thank you very much. this should help with other things aswell. [size="5"][font="Georgia"][b]Staking:[/b][/font][font="Palatino Linotype"][color="#FF0000"][/color][color="#FFFF00"][/color][color="#00FF00"] 4+ mil[/color][/font] [font="Georgia"][b]Current Status:[/b][/font][font="Palatino Linotype"][color="#FF0000"][/color][color="#0000FF"] Training defense [/color][/font][/size] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now