if you could be more specific about text file layout, and arrangement (ie: if multiple files - what naming pattern used)and the source of the hostname (cmdline? file? prompted?)it's hard to be of much help without more knowledge of these.

this can get the ip of a hostname (no slashes)@echo off & setlocal:: sample hostname, no slashesset test=HP307W:: next, up to "do (" is all one line!for /f "tokens=2-5 delims=[]." %%a in ('ping -a -n 1 %test% ^| find "Pinging %test% ["') do (echo.%%a %%b %%c %%dset ip3=%%a.%%b.%%cecho IP3:[%ip3%])

i can't see anything wrong except on my system the first 7 bytes of the output from line2 from "ping" is "Pinging" and then host3is trying to take nonexistant bytes from host2.set host2=!host:~0,7! only 7 bytes longset host3=!host2:~15,26! starts at nonexistant byte# 15. I think you wanted:set host2=!host:~8!but the "tokens" could have taken care of all that if setup to do so.

on a side note, why does my "ping" that came with windows xp not show the resolved hostname?it takes the -a just fine and proceeds to politely ignore it. i copied my ping over from the winME and that one works... go figure, MS strikes again.

The information on Computing.Net is the opinions of its users. Such
opinions may not be accurate and they are to be used at your own risk.
Computing.Net cannot verify the validity of the statements made on this
site. Computing.Net and Compnet Ventures, LLC hereby disclaim all responsibility
and liability for the content of Computing.Net and its accuracy.