"proxy" batch file

Hewlett-packard / Rc659aa-aba a1632x
July 13, 2009 at 11:28:10
Specs: Microsoft Windows Vista Home Premium, 2 GHz / 2045 MB
hi,
does anybody know of a way to make a batch file
that uses the tracert command on a site that you
type in, then take the IP address it found and put
it into internet explorer?

See More: "proxy" batch file

Report •


#1
July 13, 2009 at 13:56:48
*WHICH* IP?


=====================================
If at first you don't succeed, you're about average.

M2


Report •

#2
July 16, 2009 at 11:14:15
the last IP address found last on the list

Report •

#3
July 17, 2009 at 04:28:04
@echo off & setLocal enableDELAYedexpansion

tracert yahoo.com | find /v "complete" > y

for /f "tokens=8 delims= " %%a in (y) do (
set str=%%a
)

set str=!str:[=!
set str=!str:]=!
start firefox !str!


=====================================
If at first you don't succeed, you're about average.

M2


Report •

Related Solutions

#4
July 17, 2009 at 14:35:41
is there a way to set the IP address as a variable?

Report •

#5
July 17, 2009 at 15:58:40
That's what the script does.


=====================================
If at first you don't succeed, you're about average.

M2


Report •

#6
July 17, 2009 at 17:14:35
well the problem is that instead of copying the number
(209.191.93.53), it copies the address just before that
(b1.www.vip.mud.yahoo.com)

Report •

#7
July 17, 2009 at 17:29:07
OK I see what happened. I'll work on it.


=====================================
If at first you don't succeed, you're about average.

M2


Report •

#8
July 18, 2009 at 15:44:15
thanks dood

Report •

#9
July 19, 2009 at 04:14:49
:: lesson learned: db qot in () ; delims=" NG NG

@echo off & setLocal EnableDELAYedExpansion

for /f "tokens=* delims= " %%a in ('tracert yahoo.com ^| find "yahoo"') do (
  set str=%%a
)

:loop
  for /f "tokens=1* delims= " %%a in ("!str!") do (
    if "%%b" neq "" (
    set str=%%b
    goto :loop
    )
  )

set str=!str:[=!
set str=!str:]=!
echo IP is !str!


=====================================
If at first you don't succeed, you're about average.

M2


Report •

#10
July 19, 2009 at 12:14:47
thanks so much!

Report •


Ask Question