Solved

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

Posted on 2004-09-10
1
249 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Nslookup is a command line driven utility supplied as part of most Windows operating systems that can reveal information related to domain names and the Internet Protocol (IP) addresses associated with them. In simple terms, it is a tool that can …
The Need In an Active Directory enviroment, the PDC emulator provide time synchronization for the domain. This is important since Active Directory uses Kerberos for authentication.  By default, if the time difference between systems is off by more …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

744 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now