Mark,

We use the forfiles.exe utility that comes with the NT Resource kit.  I
have attached it here and below I have pulled the code out of our
hotbackup.cmd which runs our hotbackups.  Its  the last step in our
hotbackup, to clean up old archived logs which have already been
archived to tape.  If you need any help with it just let me know.  I've
cc:ed you directly because I assume the listserv will strip the
executable out of my email.

Reed


obviously, at the beginning of the script all the variables, like
%bkupdir%, are defined

rem
rem   Remove archived redo log files older than 3 days.
rem     forfiles is from the NT Resource Kit
rem             -p specifies search path
rem             -m specifies search mask
rem             -d specifies number of days (+/-) from today
rem             -c specifies the command to execute on each file
rem                "cmd /c" executes command specified then terminates
the shell
rem
%bkupdir%\forfiles -p%archdir%\%ORACLE_SID% -m*.arc -d-3 -c"cmd /c del
@FILE"
rem
rem   Remove trace files older than 35 days.
rem
%bkupdir%\forfiles -p%udumpdir% -m*.trc -d-35 -c"cmd /c del @FILE"



-----Original Message-----
Sent: Thursday, April 04, 2002 5:39 AM
To: Multiple recipients of list ORACLE-L


Hi All,

To save me re-inventing the wheel:

Does anybody have a batch script (that runs on NT) that deletes archive
log files that are older than X days old? I've looked at the DEL
command, but this doesn't have a date/time based attribute parameter..

Has anybody been through this already?

All help appreciated!

Mark

===================================================
 Mark Leith             | T: +44 (0)1905 330 281
 Sales & Marketing      | F: +44 (0)870 127 5283
 Cool Tools UK Ltd      | E: [EMAIL PROTECTED]
===================================================
           http://www.cool-tools.co.uk
       Maximising throughput & performance


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Mark Leith
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the
message BODY, include a line containing: UNSUB ORACLE-L (or the name of
mailing list you want to be removed from).  You may also send the HELP
command for other information (like subscribing).

<<attachment: forfiles.exe>>

Reply via email to