WinXP`s Dos - Q. for gurus

Rastalovich

New member
A question for all of yall in the know. (no Amiga networked to these servers, so I got no easy solution at hand :p) AmigaDOS had an embedded statement that in it`s concept had copyright Microsoft - I`m afraid that has to be a lie. I can do this with consumate easy on it, but not on a pc.

Theory is based around pinging pcs, by their alias rather than ip number.

Now, what I want to do, and tbh i`ve got very little time to go off and read pages of text about it, is to have a .txt file containing a list of aliases (taken from a spreadsheet) that is meant to represent all the aliases active on a server, ping each alias by line of that .txt file, if there`s no reply - output that alias to another .txt file. (enabling this file to be used again just incase the pc happened not to be on)

The representation in the spreadsheet is wholey innacurate, something of the order of 1000 machines. Unfortunately I`ve got windows and it`s dos to work in.

lmao unless there`s a util for windows that u can use in the same fashion.

Textfile with list of aliases->pinging routine->a textfile with non responsive pcs.

Mucho opinions would be appreciated.

EDIT: meant to mention, not hack utils, this has to be legit.
 
pay for expert sex change? :p really annoys me too!

Code:
:====8<-----[ FileName.cmd ]-----

@ECHO OFF

TITLE Network Check

REM -----------------------------------

REM 

SET MachineList=names.txt

SET ResultsFile=results.txt

REM 

REM -----------------------------------

CLS

ECHO.

IF NOT EXIST "%MachineList%" (

ECHO Cannot locate Machine List: %MachineList%

PAUSE>NUL

GOTO :EOF

)

ECHO Processing all machine names in %MachineList% . . .

ECHO.

FOR /f "tokens=*" %%M in (%MachineList%) do CALL :CHECK "%%M"

GOTO :EOF

:CHECK

SET Machine=%~1

SET Machine=%Machine: =%

PING -w 1000 %Machine%>NUL

IF %ERRORLEVEL% NEQ 0 ECHO %Machine% did not respond at %Time%>>%ResultsFile%

EXIT /B

:EOF

:====8<-----[ FileName.cmd ]-----

HTH

[r.D]

List of computers in names.txt and results should appear in results.txt
 
Thanks nathan, I can semi understand the backwards logic of msdos to see how that works - mee thinks.

This bit:

FOR /f "tokens=*" %%M in (%MachineList%) do CALL :CHECK "%%M"

Is that, until the end of the file, do :CHECK, with %%M being each line as it goes through the file ?
 
name='Rastalovich' said:
Thanks nathan, I can semi understand the backwards logic of msdos to see how that works - mee thinks.

This bit:

FOR /f "tokens=*" %%M in (%MachineList%) do CALL :CHECK "%%M"

Is that, until the end of the file, do :CHECK, with %%M being each line as it goes through the file ?

i actaully havent a clue, i just googled :p i dont do enough bat files ect anymore, so kinda lost knowledge in that area.
 
Reppage, used the code, adapted it a fair bit and it works @home, so should be fine.

Take about 30mins to check all the aliases with anyluck ;)
 
Back
Top