Start directory for Command Window

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?
 
You can use the following command:

SET SPOOLDIR*ECTORY [Directory]

Determines in which directory spool files are stored if the SPOOL command does not specify an absolute path.
You can add this command to the login.sql file in the PL/SQL Developer installation directory to define a default spool directory.
 
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.
 
Back
Top