Re: how to spool to C:\Documents and Settings\xzeng\My Documents?

From: Terry Dykstra <tddykstra_at_forestoil.ca>
Date: Tue, 19 Aug 2008 14:14:58 GMT
Message-ID: <CzAqk.8603$%b7.6721@edtnps82>


"Malcolm Dew-Jones" <yf110_at_vtn1.victoria.tc.ca> wrote in message news:48aa0880$1_at_news.victoria.tc.ca...
> sasworks (xuzengpj_at_gmail.com) wrote:
> : I have no problem spooling files to directories like C:\myfolder. But
> : in Windows, I use "My Documents" folder alot and that directory name
> : has spaces in it. I tried the following:
>
> : Spool 'C:\Documents and Settings\xzeng\My Documents\myfile.txt'
>
> : And the SQL+ says "Spool unsucessful".
>
> : How do I spool the output to a directory whose name has spaces in
> : it???
>
> I know three things that work
>
> 1. In sqlplus (command line version) I start it from the command line from
> within the desired directory. Then I use the spool command without
> specifying the directory. The output goes into the current directory.
>
> DOS> cd Q:\this path\has spaces\in it\work
> DOS> sqlplus
>
> SQL> spool X (creates X.LST in the above directory)
>
> This also works for sqlplusw (the window version of sqlplus). I launch
> sqlplusw from the command line so this easily works for me, but if you
> want to open it with the mouse then you can probably set the current
> directory within a lnk file to make that work, though I haven't tested
> that.
>
>
> 2. In sqlplusw (window version) I use File::Spool to select the directory
> and attempt to create a spool file in that directory.
>
> The create fails, but the selected directory becomes the current directory
> (if it isn't already) and then you can spool the file without specifying
> the path, just like 1. above.
>
> 3. You can use the short path name which does not have spaces in the file
> name.
>
> DIR/X will show you short names, but you have to use it multiple times
> to find each short name in the path.
>
> If you start an old program like EDIT or DEBUG and NT will switch to using
> the 8.3 names, and then the path shown in CD or DIR and etc will show the
> complete path using 8.3 names only. There is probably a much better way
> to do this, but I don't do this often so running an old program is what I
> am able to remember when I need it.
>

Use double quotes instead of single quotes around the spoolfile name.

-- 
Terry Dykstra 
Received on Tue Aug 19 2008 - 09:14:58 CDT

Original text of this message