Re: Network File Audit/Scanning




<paul.crockett@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.


.



Relevant Pages

  • Re: finding duplicated files
    ... duplicates and rems out the delete command for the first duplicate in each set. ... echo Purpose: Deletes identical files using multiple checksums from FSUM ... goto:EOF ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: Deleting accounts and folders
    ... if ==@echo Syntax: DelUser UserName&goto:EOF ... if /i "%user%" NEQ "%usr%" goto notfound ...
    (microsoft.public.win2000.general)
  • Re: OT: help with a text file
    ... goto:EOF ... echo %line%>>outputfile.txt ... I'd also recommend VBScript. ...
    (sci.electronics.design)
  • Re: Network File Audit/Scanning
    ... echo Checking %1 ... if exist c:\Audited\%1.txt goto:eof ... you all PCs that have the file you're looking for. ...
    (microsoft.public.windows.file_system)
  • Re: Searching Within a Text File
    ... Steve Seguis schrieb: ... > goto:EOF ... @echo off&setlocal EnableDelayedExpansion ...
    (microsoft.public.scripting.vbscript)

Loading