RE: Softball (I hope) - Current Directory in SQLPlus

From: <>
Date: Wed, 18 Dec 2013 16:07:55 -0500
Message-ID: <>


This looks like a great research project J- but can you share what you are attempting to achieve and why  

  • I assume that you are looking to execute this essentially in SQL plus or PLSQL anonymous block
  • I could be wrong but SQLPLUS though does have a concept of a SQLPATH, it does not have a concept of current directory (pwd) - it just executes the scripts

o So are you then looking to have this directory called as a function dynamically executed for each sql script so that it correctly outputs the directory name from where the script was executed.

One quick thought would be ! echo `pwd` > /tmp/1.result and then read /tmp/1.result in a plsql function

I will need to test  

Thanks and Regards  

[] On Behalf Of Ric Van Dyke Sent: Wednesday, December 18, 2013 3:48 PM To:
Subject: Softball (I hope) - Current Directory in SQLPlus  

I thought this would be easy but I'm not figuring it out nor am I able to find it in all my searching.  

I want to create a directory for the current directory. I want to do this programmatically in SQLPlus with or without PL/PQL is fine.  


It doesn't appear to be in SYS_CONTEXT.  

Yes I know I can do a HOST CD in SQLPlus to see the current directory, but how to I put the output of that that into the CREATE command?  



Ric Van Dyke

Education Director

Hotsos Ltd.  

Please visit our website at for important disclosures and information about our e-mail policies. For your protection, please do not transmit orders or instructions by e-mail or include account numbers, Social Security numbers, credit card numbers, passwords, or other personal information.

Received on Wed Dec 18 2013 - 22:07:55 CET

Original text of this message