List files stored in a Directory Object
606456Sep 8 2009 — edited Sep 9 2009Hi,
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