command for searching pcs on network

  • Thread starter Thread starter Jan Springer
  • Start date Start date
J

Jan Springer

I am looking for a command that i can run from my server
to search pc's on the network for specific files. We
have over 400 pc's so one at a time is very tedious.

thank you
 
I am looking for a command that i can run from my server
to search pc's on the network for specific files. We
have over 400 pc's so one at a time is very tedious.

thank you

If you built a file of computer names (like mycomputers.txt), you could

for /f "Tokens=*" %%c in (mycomputers.txt) do :search %%c
....
....
Exit /b 0
:search
for /f "Tokens=*" %%a in ('dir \\%1\*.* /s^|Findstr "the file") do (
whatever you want to do when it is found
)

I'm sure an even better way could be found if you specified exactly what you
were looking for and what you do when you find it.


Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com
 
If you built a file of computer names (like mycomputers.txt), you could

for /f "Tokens=*" %%c in (mycomputers.txt) do :search %%c
<snip>


Rather than maintaining a list, it may be easier to put
all the computer accounts into group and and enumerating them
using a "net group" command. I think this would more likely be
maintained.
 
Back
Top