Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE:Deleting Files in NT

RE:Deleting Files in NT

From: Scott Crabtree <scott_at_psscorp.com>
Date: Wed, 23 May 2001 15:12:30 -0700
Message-ID: <F001.0030C93D.20010523143054@fatcity.com>

Raj,

        If you have the resource kit installed you can use forfiles.

forfiles -pp:\zipfiles\hot\ -s -m*.* -d-20052001 -c"CMD /C DEL /Q @FILE";

Forfiles is helpful for ton's of DB Maintenance, you can pipe the results to any dos command you want.

        We use a statement like the one below in our spool_Hot_Backup script

to prune the backup directories before we put all the tablespaces in hot backup mode and ocopy them, We then compress them in a staging directory using pacomp and move them to a drive so that last nights datafiles are around for a speedy recovery (If Necessary).

     /* Clean Out ZIP Files older than two days: Uses Forfiles Resource Kit*/

      select to_char(sysdate-2,'ddmmyyyy') into datestr from dual;
     dbms_output.put_line('host forfiles -p'||backupdir||' -s -m*.*

-d-'||datestr||
' -c'||chr(34)||'CMD /C DEL /Q @FILE'||chr(34)||';');

HTH, (hazardous terminal halitosis)

Scott Crabtree

-----Original Message-----

Sent: Wednesday, May 23, 2001 11:45 AM
To: Multiple recipients of list ORACLE-L

DBAs

How do I delete files from NT which are older than a week. I need this to organise my backup dump files.

Cheers

Raj
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Raj Gopalan
  INET: raj.gopalan_at_netdecisions.co.uk

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: ListGuru_at_fatcity.com (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).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Scott Crabtree
  INET: scott_at_psscorp.com
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: ListGuru_at_fatcity.com (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). Received on Wed May 23 2001 - 17:12:30 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US