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

Home -> Community -> Usenet -> c.d.o.tools -> Re: UTL_FILE - check for file existence?

Re: UTL_FILE - check for file existence?

From: Mark Wagoner <mwagoner_at_iac.net>
Date: Wed, 24 Jan 2001 16:49:09 -0500
Message-ID: <94nikl$6dr$1@genma.iac.net>

I have done this using the DBMS_LOB package. This package contains the function FILEEXISTS. Of course, you have to be on 8i for this, and it may require some rework to switch from UTL_FILE.

With UTL_FILE, you could try opening the file and see if you get an error, but that is probably not the most efficient way.

"Joseph Ranseth" <jransethNO_SPAM_at_hotmail.com> wrote in message news:CBHb6.1929$wb7.57107_at_news1.mts.net...
> Is there some way of using the UTL_FILE package to check to see if a
> non-text file(.jpg) exists?
>
> Currently on out website we have numerous people, that may or may not have
 a
> photo associated with them. Right now the files are being stored on the
> webserver, and the paths to the files are being stored in a
> column(photo_path). If the column contains a null value, I use a default,
> "No photo avail" type file instead. To save time and effort of inserting
> the photo path into each player, we hope to ftp the files to a certain
> directory on the webserver and name them with a standard convention(using
> the key from the players table), thus eliminating the need for the
> photo_path column in the table.
>
> I don't know of a function to check to see if the file exists, but I was
> thinking that maybe I could try to open the file, and if it returns an
> exception, then I could use the default file.
>
> Has anyone done this, or can anyone offer any insight as to the
 feasability
> of this?
>
> Thanks,
>
> Joseph Ranseth - Webmaster
> World Cup Fishing
> www.worldcupfishing.com
>
>
>
Received on Wed Jan 24 2001 - 15:49:09 CST

Original text of this message

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