Reputation: 1
I have created an Oracle Directory on my local computer (c:\temp), and as an example I also put several files inside that directory:
My question is how I can get all the filenames inside that directory from PL/SQL?
Thank you
Upvotes: 0
Views: 6350
Reputation: 231661
You can't. PL/SQL doesn't provide a function to list the contents of a directory.
Assuming that the Oracle database is installed on your local server (the database generally cannot access files stored on the client file system) you can, however, create a Java stored procedure that lists the contents of an operating system directory and call that from PL/SQL. The thread I links to provides one implementation of this sort of procedure. There are other implementations floating around on the internet as well.
Upvotes: 1