• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 268
  • Last Modified:

How can I find all RDF files on my entire domain (in all PCs)


I have to search RDF files on my entire network (domain) we are using windows 2000 professional on our desktops and have Windows 2000 Servers. Is there any software which can give me positive results. That can be demo version. we will try and then buy it if required.
0
AzfarL
Asked:
AzfarL
1 Solution
 
oBdACommented:
This might work for you: It will scan either a single machine that's passed in the command line, or a list of machines, when called with /L as first argument and the path and name of the file  as second argument:
SearchRDF SomeMachine
or
SearchRDF /L S:\ome\Machine\list.txt
Machines that aren't turned on when you run the script will be ignored and listed in a "failed" file. You can use this file to run it against the remaining machines at a later time, but rename it before you try again!
If you don't have a list of machine at hand, you can create one by typing
net group "domain computers" /domain >machine.txt

====8<----[SearchRDF.cmd]----
@echo off
setlocal
:: *** List of Shares/folders to be scanned:
set ScanFolders=C$ D$
:: *** Pattern to scan for:
set ScanPattern=*.rdf
:: *** File with machine names that didn't respond
:: *** default: %D*rive, *P*ath, *N*ame of argument *0* (the script name), with the extension .txt
set FailedFile=%~dpn0.txt

if %1.==. goto leave
if /i not %1.==/L. goto process
if %2.==. goto leave
set MachineFile=%~2
if not exist "%MachineFile%" goto leave
:: *** Process a list of machines:
if exist "%FailedFile%" del "%FailedFile%"
for /f %%a in ('type "%MachineFile%"') do call :process %%a
goto leave

:process
set Machine=%1
set Machine=%Machine:\=%
set Machine=%Machine:$=%
:: *** Name of the log file:
set LogFile=%~dpn0-%Machine%.log
echo Processing %Machine% ...
ping -n 1 %Machine% | find "TTL" >NUL
if errorlevel 1 goto :NoResponse
:: ***
for %%a in (%ScanFolders%) do if exist "\\%Machine%\%%~a" (
  dir /a:-d /s /b "\\%Machine%\%%~a\%ScanPattern%" >"%LogFile%"
)

goto :eof

:NoResponse
echo ... not responding.
if not "%MachineFile%"=="" >>"%FailedFile%" echo %Machine%
goto :eof

:leave
====8<----[SearchRDF.cmd]----
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now