-
reading a directory listing in SQL/PLUS
*Windows 2000 and Oracle 9i*
I'm having troubles figuring out how to read a current directory listing into a variable or record.
What i want to do is get a list of directories and be able to manipulate the data returned per directory.
ie.
dir /d/b
program files
temp
windows
then do something like
insert into crap values('program files');
thanks in advance
-
Hi Deck,
I’m not sure that’s the best solution but you could consider spooling the result of you dir command into a file with the host command:
SQL > host dir/d/b > c:\result.txt
Then access the file and read the result with the GET_LINE function of the UTL_FILE package
Hope this helps.
Philippe
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|