Results 1 to 2 of 2

Thread: Find, List, Repeat

  1. #1
    Senior Member Info Tech Geek's Avatar
    Join Date
    Jan 2003
    Location
    Vernon, CT
    Posts
    828

    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.

  2. #2
    AO übergeek phishphreek's Avatar
    Join Date
    Jan 2002
    Posts
    4,325
    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.
    Quitmzilla is a firefox extension that gives you stats on how long you have quit smoking, how much money you\'ve saved, how much you haven\'t smoked and recent milestones. Very helpful for people who quit smoking and used to smoke at their computers... Helps out with the urges.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •