Solved

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

Posted on 2004-09-10
1
256 Views
Last Modified: 2010-03-18

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
Comment
Question by:AzfarL
1 Comment
 
LVL 83

Accepted Solution

by:
oBdA earned 500 total points
ID: 12039745
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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
2 LAN/WAN on One Server 2 60
risks in installing microsoft baseline security analyser on live server 3 79
DirectAccess - Open ports 2 54
AutoCad licenses 9 71
A common practice in small networks is making file sharing easy which works extremely well when intra-network security is not an issue. In essence, everyone, that is "Everyone", is given access to all of the shared files - often the entire C: drive …
Trying to figure out group policy inheritance and which settings apply where can be a chore.  Here's a very simple summary I've written which might help.  Keep in mind, this is just a high-level conceptual overview where I try to avoid getting bogge…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question