May 3, 200917 yr 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]
May 3, 200917 yr 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
May 3, 200917 yr Author 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]
Create an account or sign in to comment