Re: Network File Audit/Scanning
- From: Puck Robinson <paul.crockett@xxxxxxxxxxxxx>
- Date: Thu, 24 Jul 2008 15:50:10 -0700 (PDT)
On Jul 24, 1:34 pm, "Pegasus \(MVP\)" <I....@xxxxxxxxxx> wrote:
<paul.crock...@xxxxxxxxxxxxx> wrote in message
news:9d329d75-788e-49b5-a949-67e9ebd5aa4a@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I need to scan my network computers for a specific file that will
always be in the same location. e.g. C:\windows\system32\filename.
Does anyone know of a way or a utility to be able to do this? I can't
find anything that allows for a specific file to be searched - but
maybe I'm missing something obvious. I remember using some file audit
utilities in the past to generically search by extension, but not by
specific file name.
I would like to save the hassle of going through all 300 computers
through the admin share to verify the presence of a file.
Any ideas?
If you keep a list of all PCs in c:\PCs.lst then you could run this batch
file a few times:
@echo off
set Filename=abc.ext
if not exist c:\Audited md c:\Audited
for /F %%a in (c:\PCs.lst) do call :Sub %%a
goto :eof
:Sub
echo Checking %1
if exist c:\Audited\%1.txt goto :eof
ping %1| find /i "bytes=" || goto :eof
if exist \\%%a\c$\windows\system32\%FileName% (
echo %date% %time% File "%FileName%" found > c:\Audited\%1.txt
) else (
echo %date% %time% > c:\Audited\%1.txt
)
Later on you sort the folder c:\Audited by size. This will immediately show
you all PCs that have the file you're looking for.
Outstanding! It worked with one correction. The "%%a" in line: "if
exist \\%%a\c$\windows\system32\%FileName% (" needed to be "%1".
After that alteration, it returned the right info. Thanks Pegasus!
Much appreciated!
.
- Follow-Ups:
- Re: Network File Audit/Scanning
- From: Pegasus \(MVP\)
- Re: Network File Audit/Scanning
- References:
- Network File Audit/Scanning
- From: paul . crockett
- Re: Network File Audit/Scanning
- From: Pegasus \(MVP\)
- Network File Audit/Scanning
- Prev by Date: Re: Network File Audit/Scanning
- Next by Date: Re: Network File Audit/Scanning
- Previous by thread: Re: Network File Audit/Scanning
- Next by thread: Re: Network File Audit/Scanning
- Index(es):
Relevant Pages
|
Loading