Print Thread
Start directory for Command Window
#53682 07/06/16 02:52 PM
Joined: Sep 2003
Posts: 387
London, UK
Member
OP Offline
Member
Joined: Sep 2003
Posts: 387
London, UK
In a Command Window, it seems the current Windows directory is always "C:\Program Files (x86)\PLSQLDeveloper". The preference setting "Files > Directories > Command files" only controls the interactive file browser, not the starting location. This means any script that attempts to create a spoolfile fails (and if it didn't fail, it would clutter up a system folder, which I don't want to do), which rather limits the usefulness of the Command Window for running scripts.

If there is currently no setting for this, please can we have it on the development wish list?

Re: Start directory for Command Window
William Robertson #53684 07/07/16 08:32 AM
Joined: Aug 1999
Posts: 22,232
Member
Offline
Member
Joined: Aug 1999
Posts: 22,232
You can use the following command:

[quote]SET SPOOLDIR*ECTORY [Directory]

Determines in which directory spool files are stored if the SPOOL command does not specify an absolute path.[/quote]
You can add this command to the login.sql file in the PL/SQL Developer installation directory to define a default spool directory.


Marco Kalter
Allround Automations
Re: Start directory for Command Window
Marco Kalter #53688 07/08/16 11:37 AM
Joined: Sep 2003
Posts: 387
London, UK
Member
OP Offline
Member
Joined: Sep 2003
Posts: 387
London, UK
Cool, thanks!

I found login.sql can also be placed in my home directory (M:\), which is great as installation folders are read-only.

btw I notice "set spooldir*ectory" is listed as a SQL*Plus-compatible command but it is actually specific to PL/SQL Developer (the next section in the 11.0 user guide). Also I couldn't find any reference to login.sql in the manuals.

Re: Start directory for Command Window
William Robertson #53689 07/11/16 09:12 AM
Joined: Aug 1999
Posts: 22,232
Member
Offline
Member
Joined: Aug 1999
Posts: 22,232
We'll update the documentation.


Marco Kalter
Allround Automations

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.035s Queries: 14 (0.013s) Memory: 2.5106 MB (Peak: 3.0394 MB) Data Comp: Off Server Time: 2024-06-17 08:28:42 UTC
Valid HTML 5 and Valid CSS