-
Find, List, Repeat
I have 30 systems in which I would like to keep track of certain documents on. Is there a way I can use the FIND program in Microsoft OS's to run off of a batch file? I would like to use find to search \\Computer\C$ and find the word "Security" and list its finds in a text document or some place. Then jump top \\Computer2\C$ and do the same thing.
-
I'm assuming you're using win2k or xp here...
how about something like...
Code:
net use g: \\computer1\c$
echo Computer 1 >c:\test.txt
tree g:\ /F | find /I "test" >> c:\test.txt
echo -------------------------------------------------------------
net use g: /delete
net use g: \\computer2\c$
echo Computer 2 >>c:\test.txt
tree g:\ /F | find /I "test" >> c:\test.txt
echo -------------------------------------------------------------
net use g: /delete
etc. etc.
I thought of other ways to do it.. but they get kinda messy...
Like
Code:
net use g: \\computer1\c$
dir /os/s g:\ > c:\file1.txt
find /I "test" c:\file1.txt >> c:\file2.txt
net use g: /delete
net use g: \\computer1\c$
dir /os/s g:\ >> c:\file1.txt
find /I "test" c:\file1.txt >> c:\file2.txt
net use g: /delete
The second way takes forever! The first way worked much better on my system.. but prints it as a tree...
I'm gonna give it a bit more thought and play around a bit more... I'll edit this if I come up with something better.