command for searching pcs on network

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
 
J

Jerold Schulman

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
 
M

Matt Hickman

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top