Re: Setting Directory Path in SQL*Plus

From: Bricklen Anderson <bricklen_at_shaw.ca>
Date: Tue, 04 Jun 2002 02:40:31 GMT
Message-ID: <3CFC278B.B0EB772B_at_shaw.ca>


[Quoted] alt.msdos.batch.nt is also good forum for this question (more likely to get an informative answer).
One environment variable that I can think of offhand is %WINDIR% , which will get you (eg.) C:\WINNT
or try like cd %WINDIR%\.. to go up to the root drive (can't remember what the root drive %...% name is).

hth

Bricklen

Justin Wigg wrote:
>
> Hi all...
>
> I am trying to write an master installation script that will install many
> tables, packages etc into an Oracle 8.1.7 database by calling several large
> subscripts in sequence.
>
> A certain directory structure has been created (for a good reason) to store
> these subscripts in different places but all within a master directory.
> What I am trying to do is set the master script up so that it can point
> itself to a different sub-directory and call a script but to do so relative
> to the original directory.
>
> This will be running on Windows 2000 Server, but I don't want to actually
> hard code the directory path into the script as there is no guarantee that
> the drive names will be the same etc, so I don't just want to say
> "_at_E:\etc\etc\etc".
>
> Is there any way I can change directories in an SQL script by using a
> DOS-style command or something to do something like "cd
> ..\..\scripts\blah\blah"? Is there maybe an environment variable I can't
> find that will do this?
>
> Many thanks...
> --
> "Managing senior programmers is | Justin Wigg - Hobart, AUSTRALIA
> like herding cats." - Dave Platt | Reply: justin_at_icsmultimedia.com.au
Received on Tue Jun 04 2002 - 04:40:31 CEST

Original text of this message