Originally posted by Adnan
I want to read a file list in a directory from a database procedure. I
m using Oracle 9i Release 2. How to do??? I don't want to user
external procedures. I know it can be done through java stored
procedure. Any other solution like a single command......Java code is
still ok...
Regards,
Adnan
There isn't a prebuilt "single command" solution. You have to write a
java stored procedure and a PLSQL wrapper procedure.
Read java docs and Look at list() or listFiles() functions in
"File" interface in "java.io" API. Goto
http://tahiti.oracle.com
for Oracle docs.
Hint:
import java.io.*;
public class foo {
public static String getFileList (String dirname) {
....
File dir = new File(dirname);
String[] entries = dir.list();
...
}
}
Regards
/Rauf Sarwar
--
Posted via
http://dbforums.com