Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search all domain computers for files... 1

Status
Not open for further replies.

k3lvin

Technical User
Jan 13, 2008
143
GB
I need to find out what computers have music stored on their C: drive on our domain. There must be a good way of doing this?

I found a pretty impressive guide for making a script to find files:


The problem with this method is it will just end up making hundreds of text files as all the computers will have .mp3, .wav, .wma etc files. I could arrange text files by size etc but still going to be painful.

Any input would be great! Thanks :)
 
But that script will search for a phrase. If you do that in the whole PC will last forever.

A dir /s *.mp3,*.wav > \\Shared folder\PCName.txt would do the trick

Cheers,
Dian
 
very nice I like your style i have it all working. I'm using:

execute.bat:
psexec @"\\Hostname\list.txt" -u domain\username -d -c "\\Hostname\search.bat"

search.bat:
cd c:\
dir /s *.mp3,*.wma *.wav > "\\Hostname\Results\%computername%.txt"

This outputs exactly what I want. The next thing I need to do is to male list.txt update with all the host names, this must be easier I'm going to look now ^^

Thanks for your help


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top