Return-Path: <root@fatcity.cts.com>
Received: from newsfeed.cts.com (newsfeed.cts.com [209.68.248.164])
 by naude.co.za (8.11.2/8.11.2) with SMTP id g4T1NNL21224
 for <oracle-l@naude.co.za>; Tue, 28 May 2002 21:23:23 -0400
Received: from fatcity.UUCP (uucp@localhost)
 by newsfeed.cts.com (8.9.3/8.9.3) with UUCP id KAA76134;
 Tue, 28 May 2002 10:21:35 -0700 (PDT)
Received: by fatcity.com (26-Feb-2001/v1.0g-b71/bab) via UUCP id 0046CFD8; Tue, 28 May 2002 10:04:45 -0800
Message-ID: <F001.0046CFD8.20020528100445@fatcity.com>
Date: Tue, 28 May 2002 10:04:45 -0800
To: Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
X-Comment: Oracle RDBMS Community Forum
X-Sender: Richard Huntley <rhuntley@mindleaders.com>
Sender: root@fatcity.com
Reply-To: ORACLE-L@fatcity.com
Errors-To: ML-ERRORS@fatcity.com
From: Richard Huntley <rhuntley@mindleaders.com>
Subject: RE: how to pick the lastes file using UTL_FILE package ?
Organization: Fat City Network Services, San Diego, California
X-ListServer: v1.0g, build 71; ListGuru (c) 1996-2001 Bruce A. Bergman
Precedence: bulk
Mime-Version: 1.0
Content-Type: multipart/mixed;	boundary="----=_NextPartTM-000-61a0dd7c-7243-11d6-8b0a-00b0d04949c1"
------=_NextPartTM-000-61a0dd7c-7243-11d6-8b0a-00b0d04949c1
Content-Type: multipart/alternative;
 boundary="----_=_NextPart_001_01C20668.CA3B8920"
------_=_NextPart_001_01C20668.CA3B8920
Content-Type: text/plain;
 charset="iso-8859-1"

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@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@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).

------_=_NextPart_001_01C20668.CA3B8920
Content-Type: text/html;
 charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RE: how to pick the lastes file using UTL_FILE package ?</TITLE>
</HEAD>
<BODY>

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

<P><FONT SIZE=2>HTH,</FONT>
<BR><FONT SIZE=2>Rich</FONT>
</P>

<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Rahul [<A HREF="mailto:rahul@ratelindo.co.id">mailto:rahul@ratelindo.co.id</A>]</FONT>
<BR><FONT SIZE=2>Sent: Monday, May 27, 2002 2:18 AM</FONT>
<BR><FONT SIZE=2>To: Multiple recipients of list ORACLE-L</FONT>
<BR><FONT SIZE=2>Subject: how to pick the lastes file using UTL_FILE package ?</FONT>
</P>
<BR>

<P><FONT SIZE=2>list,&nbsp; the requirement is to use the UTL_FILE package on the server side to</FONT>
<BR><FONT SIZE=2>open and process the files as they are created (each hour) in a server's</FONT>
<BR><FONT SIZE=2>directory !!</FONT>
<BR><FONT SIZE=2>could anyone suggest a logic to pick up the the lastest file created in that</FONT>
<BR><FONT SIZE=2>dir. ? </FONT>
</P>

<P><FONT SIZE=2>TIA</FONT>
</P>

<P><FONT SIZE=2>8.1.6 on win2k</FONT>
</P>
<BR>

<P><FONT SIZE=2>-- </FONT>
<BR><FONT SIZE=2>Please see the official ORACLE-L FAQ: <A HREF="http://www.orafaq.com" TARGET="_blank">http://www.orafaq.com</A></FONT>
<BR><FONT SIZE=2>-- </FONT>
<BR><FONT SIZE=2>Author: Rahul</FONT>
<BR><FONT SIZE=2>&nbsp; INET: rahul@ratelindo.co.id</FONT>
</P>

<P><FONT SIZE=2>Fat City Network Services&nbsp;&nbsp;&nbsp; -- (858) 538-5051&nbsp; FAX: (858) 538-5051</FONT>
<BR><FONT SIZE=2>San Diego, California&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Public Internet access / Mailing Lists</FONT>
<BR><FONT SIZE=2>--------------------------------------------------------------------</FONT>
<BR><FONT SIZE=2>To REMOVE yourself from this mailing list, send an E-Mail message</FONT>
<BR><FONT SIZE=2>to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in</FONT>
<BR><FONT SIZE=2>the message BODY, include a line containing: UNSUB ORACLE-L</FONT>
<BR><FONT SIZE=2>(or the name of mailing list you want to be removed from).&nbsp; You may</FONT>
<BR><FONT SIZE=2>also send the HELP command for other information (like subscribing).</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C20668.CA3B8920--

------=_NextPartTM-000-61a0dd7c-7243-11d6-8b0a-00b0d04949c1--

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Richard Huntley
  INET: rhuntley@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@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).

