Hi everyone, I would like to insert in my SPSS program a code that will automatically pick up the directory were the SPSS program is located and set it up as the relative path. I do not want to use python. I do not want to use the CD command and write the location of the file. Determination of the current working directory should be done without me having to specify it. I want commands that work within the framework of SPSS. No plugins with external packages. Is this doable? I am using version 22. Thanks. Best regards, Florio |
It's a doddle with Python. Albert-Jan has also created a small extension to achieve the same I believe, which can be downloaded from within SPSS.
Not sure if there is solution using scripting, if that would work for you? Also how are you defining exactly "were the SPSS program is located"? Is that the saved syntax? Other than that you are limited to only knowing only the Temporary Folder set under Options--File Locations |
Administrator
|
Sure:
see .GetSPSSPath property of ObjSPSSApp object Sub Main Debug.Print obSPSSApp.GetSPSSPath End Sub Unclear why you want this as it is a terrible idea to muck around/Write in the application directory. Good luck.
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
In reply to this post by Florio Arguillas
----------------------------
On Fri, Mar 20, 2015 4:44 PM CET Florio Orocio Arguillas wrote: >Hi everyone, > >I would like to insert in my SPSS program a code that will automatically pick up the directory were the SPSS program is located and set it up as the relative path. > >I do not want to use python. >I do not want to use the CD command and write the location of the file. Determination of the current working directory should be done without me having to specify it. >I want commands that work within the framework of SPSS. No plugins with external packages. > >Is this doable? > >I am using version 22. Hi Florio! I wrote an extension command called CWD for this a long time ago. IIRC you can can just use 'CWD' to switch to the directory of the designated syntax (if any). Albert-Jan PS: greetings to Ithaca :-) ===================== 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 |
Free forum by Nabble | Edit this page |