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: how to pick the lastes file using UTL_FILE package ?

RE: how to pick the lastes file using UTL_FILE package ?

From: Richard Huntley <rhuntley_at_mindleaders.com>
Date: Tue, 28 May 2002 10:04:45 -0800
Message-ID: <F001.0046CFD8.20020528100445@fatcity.com>


Rahul, here is how you'd do it on a Unix box: ls -t|line ls -t would give you a list of files most recent first, then the line command would give
you back the first filename only. In 2K the first part of that is DIR /O:-D, not sure how you
get just the first filename from the list (the latest file will be first), but you could redirect
that command to a file then read the first filename from the file! (DIR /O:-D > files)

HTH,
Rich

-----Original Message-----
Sent: Monday, May 27, 2002 2:18 AM
To: Multiple recipients of list ORACLE-L

list, the requirement is to use the UTL_FILE package on the server side to open and process the files as they are created (each hour) in a server's directory !!
could anyone suggest a logic to pick up the the lastest file created in that dir. ?

TIA 8.1.6 on win2k

--

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

Author: Rahul
  INET: rahul_at_ratelindo.co.id

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: Richard Huntley
  INET: rhuntley_at_mindleaders.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 Tue May 28 2002 - 13:04:45 CDT

Original text of this message

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