cd command not honoured

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

cd command not honoured

Albert-Jan Roskam
Hi,
 
I found the following relative path specification in an sps file from 1991 (under 'save outfile'). Even when I add the cd command, the file is still saved under c:\temp. Is that documented behavior?
data list / c (f2).
begin data
1
end data.
cd "d:\".
save outfile "\temp\@@@@.sav". /* file is saved in c:\temp, not d:\temp.

 
Regards,
Albert-Jan


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a
fresh water system, and public health, what have the Romans ever done for us?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
Reply | Threaded
Open this post in threaded view
|

Re: cd command not honoured

Bruce Weaver
Administrator
Hi Albert-Jan.  It looks like you are trying to save the file to "d:\\temp\@@@@.sav".  What happens if you remove the leading "\" from the SAVE OUTFILE line?

Cheers,
Bruce

Albert-Jan Roskam wrote
Hi,
 
I found the following relative path specification in an sps file from 1991 (under 'save outfile'). Even when I add the cd command, the file is still saved under c:\temp. Is that documented behavior?
data list / c (f2).
begin data
1
end data.
cd "d:\".
save outfile "\temp\@@@@.sav". /* file is saved in c:\temp, not d:\temp.

Regards,
Albert-Jan


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a
fresh water system, and public health, what have the Romans ever done for us?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Re: cd command not honoured

Jon K Peck
In reply to this post by Albert-Jan Roskam
That's the way Windows works.  Try it at a DOS prompt.  You are changing the default directory on the d drive, but you are not changing the default drive.

HTH,

Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
new phone: 720-342-5621




From:        Albert-Jan Roskam <[hidden email]>
To:        [hidden email]
Date:        08/22/2012 02:38 AM
Subject:        [SPSSX-L] cd command not honoured
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Hi,
 
I found the following relative path specification in an sps file from 1991 (under 'save outfile'). Even when I add the cd command, the file is still saved under c:\temp. Is that documented behavior?
data list / c (f2).
begin data
1
end data.
cd "d:\".
save outfile "\temp\@@@@.sav". /* file is saved in c:\temp, not d:\temp.

 
Regards,
Albert-Jan



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a
fresh water system, and public health, what have the Romans ever done for us?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reply | Threaded
Open this post in threaded view
|

Re: cd command not honoured

Bruce Weaver
Administrator
So Albert-Jan needs to use HOST to change the drive, I suppose.

HOST COMMAND=['d:']. /* change drive to D: .
save outfile "\temp\@@@@.sav". /* save file to d:\temp.



Jon K Peck wrote
That's the way Windows works.  Try it at a DOS prompt.  You are changing
the default directory on the d drive, but you are not changing the default
drive.

HTH,

Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
new phone: 720-342-5621




From:   Albert-Jan Roskam <[hidden email]>
To:     [hidden email]
Date:   08/22/2012 02:38 AM
Subject:        [SPSSX-L] cd command not honoured
Sent by:        "SPSSX(r) Discussion" <[hidden email]>



Hi,

I found the following relative path specification in an sps file from 1991
(under 'save outfile'). Even when I add the cd command, the file is still
saved under c:\temp. Is that documented behavior?
data list / c (f2).
begin data
1
end data.
cd "d:\".
save outfile "\temp\@@@@.sav". /* file is saved in c:\temp, not d:\temp.


Regards,
Albert-Jan


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All right, but apart from the sanitation, the medicine, education, wine,
public order, irrigation, roads, a
fresh water system, and public health, what have the Romans ever done for
us?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).
Reply | Threaded
Open this post in threaded view
|

Automatic reply: cd command not honoured

Fleming, Katie (DOT)

Hello,

 

I will be out of the office August 22nd through September 3rd. I will respond to e-mails and calls on my return. If you have an urgent need, please contact:

 

Brad Estochen

[hidden email]

651-234-7011

or

Julie Whitcher 

[hidden email]

651-234-7019

 

Thank you,

 

Katie Fleming

 

Reply | Threaded
Open this post in threaded view
|

Re: cd command not honoured

Albert-Jan Roskam
In reply to this post by Bruce Weaver
That would be one solution. Another one is
cd "d:\temp".
save outfile "@@@@.sav".
or:
file handle tempdir  /name = "d:/temp.
save outfile "tempdir/@@@@.sav".
 
That old syntax contained yet another, even more confusing way of specifying relative paths I didn't know about.
 
Regards,
Albert-Jan


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a
fresh water system, and public health, what have the Romans ever done for us?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
From: Bruce Weaver <[hidden email]>
To: [hidden email]
Sent: Wednesday, August 22, 2012 2:58 PM
Subject: Re: [SPSSX-L] cd command not honoured

So Albert-Jan needs to use HOST to change the drive, I suppose.

HOST COMMAND=['d:']. /* change drive to D: .
save outfile "\temp\@@@@.sav". /* save file to d:\temp.




Jon K Peck wrote

>
> That's the way Windows works.  Try it at a DOS prompt.  You are changing
> the default directory on the d drive, but you are not changing the default
> drive.
>
> HTH,
>
> Jon Peck (no "h") aka Kim
> Senior Software Engineer, IBM
> peck@.ibm
> new phone: 720-342-5621
>
>
>
>
> From:  Albert-Jan Roskam &lt;fomcl@&gt;
> To:    SPSSX-L@.uga
> Date:  08/22/2012 02:38 AM
> Subject:        [SPSSX-L] cd command not honoured
> Sent by:        "SPSSX(r) Discussion" &lt;SPSSX-L@.uga&gt;
>
>
>
> Hi,
>
> I found the following relative path specification in an sps file from 1991
> (under 'save outfile'). Even when I add the cd command, the file is still
> saved under c:\temp. Is that documented behavior?
> data list / c (f2).
> begin data
> 1
> end data.
> cd "d:\".
> save outfile "\temp\@@@@.sav". /* file is saved in c:\temp, not d:\temp.
>
>
> Regards,
> Albert-Jan
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> All right, but apart from the sanitation, the medicine, education, wine,
> public order, irrigation, roads, a
> fresh water system, and public health, what have the Romans ever done for
> us?
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>




-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/cd-command-not-honoured-tp5714791p5714797.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD