Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need to scan about 50 desktop computers and check to see if any *.doc, *.xls, *.ppt etc... files are being stored locally. I am wondering what tools might be available for this. A quick Google didn't find any great solutions so I am thinking I may need to write a script to do this.

share|improve this question
add comment

4 Answers

up vote 8 down vote accepted

I'm assuming you're doing this from a Windows machine to Windows machines. I'd do something quick and dirty like:

Machines.TXT

COMPUTERNAME-1
COMPUTERNAME-2
COMPUTERNAME-3

Scan-Machines.cmd

@echo off
if "%1"=="" goto all

echo Scanning %~1
dir "\\%~1\c$" /s /a /b > "%~1.txt"
goto end

:all
for /f "delims=" %%i in (Machines.TXT) do call %0 "%%i"

:end

Put all the machine names in the Machines.TXT file (and put it in the same folder as Scan-Machines.cmd). Run Scan-Machines.CMD and you'll end up with one text file for each machine listing all the files on their "C:" "drives". Then you can just search the text files.

Yep-- quick and dirty, but cheap.

Edit: Fixed to allow computer names with spaces in them. Computer names with spaces make me weep, but the script should handle them.

share|improve this answer
    
If you wanted, you could modify the "dir \\%1..." line to be "start cmd /c dir \\%1\c$ /s /a /b > %1.txt" and it would kick off jobs in parallel. W/ 50 machines, though, I don't know that I'd do that. I'd probably just start it and go home. –  Evan Anderson Jun 4 '09 at 1:35
    
+1 for something I havent seen before. I will be testing this out this week. –  cop1152 Jun 4 '09 at 1:41
    
Little batch scripts have saved my ass time after time. If I had a dime for every little one-off CMD script I wrote, I'd never work again. smile –  Evan Anderson Jun 4 '09 at 1:44
add comment

Good solution, Evan. To save the time and tedium of looking through the list of files searching for your entries you could add the following to Evan's script.

dir "\%~1\c$" /s /a /b *.doc *.xls *ppt > "%~1.txt"

That way you don't have to parse the returned data looking for your desired extensions.

share|improve this answer
    
I'd just grep it when it came back, I think. Knowing myself, I'd forget an extension and have to re-run the search. smile –  Evan Anderson Jun 4 '09 at 3:23
    
forget an extension? That NEVER happens. ;-) –  Shane Corellian Jun 4 '09 at 17:20
add comment

I think that some of the enterprise desktop search products have a management interface for auditing where files are stored, where duplicates of files are kept, and even where older versions of existing files are stashed away.

share|improve this answer
add comment

We've been using Cornell Spider to scan servers, documents, and databases for social security numbers on a somewhat automated basis. We've hacked some additional functionality on to talk to our database engines and to manage the scan with our desktop management software. The basic functionality in the engine is there to do what you need, you could probably just hack the engine a touch and have a solid, deployable solution that you can set to log back centrally to a shared drive.

Depending on use, there may be a better alternative to scanning. A friend who administers a student lab has started re-imaging the machine on every logout. It only takes about thirty seconds to a minute to copy a clean 10GB image over from a protected 10GB separate partition on the local machine's disk, and you don't have to worry about kids replacing the windows start splash with a crude drawing of genitalia.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.