Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Deleting Files in NT
Hello,
You can use FORFILES from the NT Resource kit or you can
download it from Dave Sisk's Web site
http://www.ipass.net/~davesisk/oont_download.htm
Your command will look like:
FOREFILES -p<path> -m*.* -c"CMD /C del @FILE -d-7 -v
C:\>forfiles
FORFILES v 1.1 - emmanubo_at_microsoft.com - 4/98
Syntax : FORFILES [-pPath] [-mSearch Mask] [-ccommand] [-d<+|-><DDMMYYYY|DD>] [-s]
-pPath Path where to start searching -mSearch Mask Search files according to <Search Mask> -cCommand Command to execute on each file(s) -d<+|-><DDMMYYYY|DD> Select files with date >= or <=DDMMYYYY (UTC) or files having date >= or <= (current date - DD days) -s Recurse directories -v Verbose mode
The following variables can be used in Command : @FILE, @FNAME_WITHOUT_EXT, @EXT, @PATH, @RELPATH, @ISDIR, @FSIZE, @FDATE, @FTIME To include special hexa characters in the command line : use 0xHH
Default : <Directory : .> <Search Mask : *.*> <Command : "CMD /C Echo
@FILE">
Examples :
FORFILES -pc:\ -s -m*.BAT -c"CMD /C Echo @FILE is a batch file" FORFILES -pc:\ -s -m*.* -c"CMD /C if @ISDIR==TRUE echo @FILE is a directory" FORFILES -pc:\ -s -m*.* -d-100 -c"CMD /C Echo @FILE : date >= 100 days" FORFILES -pc:\ -s -m*.* -d-01011993 -c"CMD /C Echo @FILE is quite old!" FORFILES -pc:\ -s -m*.* -c"CMD /c echo extension of @FILE is 0x22_at_EXT0x22"
-- Chris J. Guidry P.Eng. ATCO Electric, Metering Services Phone: (780) 420-4142 Fax: (780) 420-3854 Email: chris.guidry_at_atcoelectric.comReceived on Wed May 23 2001 - 17:12:34 CDT
> -----Original Message-----
> From: Raj Gopalan [SMTP:raj.gopalan_at_netdecisions.co.uk]
> Sent: Wednesday, May 23, 2001 09:45 AM
> To: Multiple recipients of list ORACLE-L
> Subject: Deleting Files in NT
>
> 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: Guidry, Chris INET: chris.guidry_at_atcoelectric.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).
![]() |
![]() |