Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

List files stored in a Directory Object

606456Sep 8 2009 — edited Sep 9 2009
Hi,

I looked on Google, on Oracle DB docs and here to find a convenient way to list files stored in a DIRECTORY for batch loading in a table with PL/SQL. But no luck, UTL_FILE doesn't seem to have a method for directory listing. I saw examples with some workaround like putting files list in a text file prior to loading. The directory is feeded by other process and network services, so I don't know the filelist that I need to import and, then delete. I dont have access to the server console and it's impossible for me to dump a kind of «dir» result into a text file. I saw other examples using Java, but it looks like I don't have access to Server Side Java too.

Is there a simple way to do that in PL/SQL only?
If not, I'll ask to the DBA the necessary rights to compile/run java on the server side...

The DB target versions for this requirement are 10g and 11g (mainly) on Windows environment.

Thanks
Bruno
This post has been answered by 436423 on Sep 9 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 7 2009
Added on Sep 8 2009
14 comments
8,992 views