Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Changing temp file location on Mac OS X

    Hello,

    I need to change the temp file location for Stata on a Mac laptop to an external hard drive. I've seen these two guides:

    http://www.stata.com/support/faqs/da...ment-variable/
    http://www.stata.com/support/faqs/da...ary-directory/

    But I can't seem to get them to work on my computer. The examples are all for Windows or Linux, and none of the commands seem to work. For each example, I basically get this error:

    . set STATATMP = PATHNAME
    -set STATATMP- not allowed; 'STATATMP' not recognized
    r(199);

    How do I do this on a Mac? Thanks so much!

    All the best,

    John

  • #2
    OS X is a UNIX system. The recommended set command is meant to be executed at the UNIX command line, not in Stata. On OS X, this means launching the Terminal application (typically found in the Utilities folder within the Applications folder) and then running the following two commands, the first of which sets the location of the STATTMP directory and the second of which launches Stata.
    Code:
    % setenv STATATMP /Users/lisowskiw/Documents
    % open /Applications/Stata/StataSE.app/
    Then within the Stata command window that opens, you can confirm that this had the desired effect.
    Code:
    . tempfile x
    
    . display "`x'"
    /Users/lisowskiw/Documents/S_00953.000001
    If someone doesn't beat me to it, I will try to post a simple script tomorrow that can be easily executed.

    Let me use this as a forum to suggest that the location of Stata's temporary directory should be easily configurable from within Stata, and changeable without having to exit and restart Stata.

    Comment


    • #3
      That worked. Thanks so much!

      Comment


      • #4
        An improved version of this advice has been posted at

        https://www.statalist.org/forums/for...nment-variable

        Comment

        Working...
        X