[<<]Message[>>]        Author[>>]    [<<]Subject        [<<]Thread    

Number : 153 Date : 2001-06-07 Author : Garry Deane Subject : Re: ip address range Size(KB) : 1
Why not use PING -a xxx.xxx.xxx.xxx and parse the reply using FOR to extract the machine name. Assuming you can generate a list of active IP addresses from DHCP to a text file then you can do something like: @echo off for /f %%a in (iplist.txt) do call :docopy %%a goto :next :docopy set hostname= for /f "tokens=2" %%a in ('ping -n 1 -a %1 ^| find "Pinging"') do set host=\\%%a if "%host%"=="\\%1" goto :eof xxcopy %host%\c$\winnt\repair d:\backup\repair\%host% :: - or whatever goto :eof :next Note that this assumes that the machines in iplist.txt are alive. If there is a chance that they are down, then do a second ping before the xxcopy line and find "Request timed out". If that is found then the machine isn't active. Another possibility is to use NET VIEW \\xxx.xxx.xxx.xxx and parse that result. This would not only give the hostname but also the visible shares. Garry --- In xxcopy@y..., Ann Stanaway wrote: > > I use xxcopy to manage workstations and servers on my network. > ... it would be easier to manage the batch file if I could use > the DHCP range to parse through the network connections.
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.