saving SPSS files to existing folders

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

saving SPSS files to existing folders

PerryGrossman
I have a problem of SPSS saving files in a folder where another recently opened file is stored. Is there anyway to fix that setting? I know that I can set a default folder in the options, but but it just picks one folder. I want it to work like MS office, where each file defaults to save in the folder where it was last saved. It gets very difficult to find files again and maintain version control when they get resaved in different folders. Perry
Reply | Threaded
Open this post in threaded view
|

Re: saving SPSS files to existing folders

Bruce Weaver
Administrator
Are you saving via syntax or manually?  For saving via syntax, you could use FILE HANDLE.  Here are examples from the Help file:

  FILE HANDLE thisMonthFile /NAME='/sales/data/july.sav'.
  FILE HANDLE dataDirectory /NAME='/sales/data'.
  GET FILE 'thisMonthFile'.
  GET FILE 'dataDirectory/july.sav'.

You could add drive and path info, like this:

  FILE HANDLE thisMonthFile /NAME='C:/Folder1/sales/data/july.sav'.
  FILE HANDLE dataDirectory /NAME='C:/Folder2/sales/data'.

HTH.

p.s. - I was going to go old school and suggest using macros to define folders* rather than FILE HANDLE, but I didn't want Jon's blood pressure to go too high.  ;-)

* E.g., http://www.spsstools.net/Macros/Utilities/DefinePathByMacro.txt


PerryGrossman wrote
I have a problem of SPSS saving files in a folder where another recently opened file is stored. Is there anyway to fix that setting?

I know that I can set a default folder in the options, but  but it just picks one folder. I want it to work like MS office, where each file defaults to save in the folder where it was last saved.

It gets very difficult to find files again and maintain version control when they get resaved in different folders.


Perry
--
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: saving SPSS files to existing folders

Jon K Peck
Thanks, Bruce.

File handles are a perfect construct for this type of usage.  If, though, this query is for files saved via the user interface, then, of course, the File>Save menu item will save the file in its original location if there is one for data, syntax, and output.

And note that we do have file handle support in the Python apis :-)  There is an spss.GetFileHandles api, and there is a helpful class for managing these, spssaux.FileHandles.

Jon Peck
Senior Software Engineer, IBM
[hidden email]
new phone: 720-342-5621




From:        Bruce Weaver <[hidden email]>
To:        [hidden email]
Date:        08/11/2011 10:15 AM
Subject:        Re: [SPSSX-L] saving SPSS files to existing folders
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Are you saving via syntax or manually?  For saving via syntax, you could use
FILE HANDLE.  Here are examples from the Help file:

 FILE HANDLE thisMonthFile /NAME='/sales/data/july.sav'.
 FILE HANDLE dataDirectory /NAME='/sales/data'.
 GET FILE 'thisMonthFile'.
 GET FILE 'dataDirectory/july.sav'.

You could add drive and path info, like this:

 FILE HANDLE thisMonthFile /NAME='C:/Folder1/sales/data/july.sav'.
 FILE HANDLE dataDirectory /NAME='C:/Folder2/sales/data'.

HTH.

p.s. - I was going to go old school and suggest using macros to define
folders* rather than FILE HANDLE, but I didn't want Jon's blood pressure to
go too high.  ;-)

* E.g.,
http://www.spsstools.net/Macros/Utilities/DefinePathByMacro.txt



PerryGrossman wrote:
>
> I have a problem of SPSS saving files in a folder where another recently
> opened file is stored. Is there anyway to fix that setting?
>
> I know that I can set a default folder in the options, but  but it just
> picks one folder. I want it to work like MS office, where each file
> defaults to save in the folder where it was last saved.
>
> It gets very difficult to find files again and maintain version control
> when they get resaved in different folders.
>
>
> Perry
>


-----
--
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/saving-SPSS-files-to-existing-folders-tp4690009p4690066.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