In loop FOR /F there is very good block separator delims= tokens=. But I'm frustrated that delims can hold only 1 symbol. But I want to extract from list only machines which run on 'Windows 2000' like:
FOR /F "delims='Windows 2000' tokens=2" %%i in (genlist.txt) do systeminfo /s %%i
File genlist.txt was produced by listing all the computers on network:
@echo off
FOR /F %%i in ('net view ^| find "\\"') do echo %%i
1 reply to this topic
#1
Posted 22 December 2010 - 11:06 AM
|
|
|
#2
Posted 22 December 2010 - 05:48 PM
I don't know about how to do that, but I did find some references:
Microsoft Corporation
for DOS command help
NT's FOR /F command: tokens and delims
For /f - Loop through text
Microsoft Corporation
for DOS command help
NT's FOR /F command: tokens and delims
For /f - Loop through text
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









