Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Stata Temp File issue

From   Kevin Geraghty <>
Subject   Re: st: Stata Temp File issue
Date   Tue, 14 Dec 2010 11:56:02 -0800 (PST)

try << display "`c(tmpdir)'" >> and see what it tells you.

Hm. It looks like you can't set it once you launch stata, that you have to set it beforehand using environment variables.
so you would have to do something like this on windows:
in a shell script or on the command line of a dos window:

set STATATMP="c:\temp" (or your choice of temp directory for this invocation)
<then invoke your executable from your shell window>

you can check if you got it right by typing << display "`c(tmpdir)'" >> again

----- "John C. Vernaleo" <> wrote:

> > I realize you shouldn't have to do this, that stata ought to be able
> to keep track of this stuff on its own, but one straightforward fix
> for this problem might be explicitly setting the temp directory at the
> start of each concurrent job, so that they don't share the same
> temp/work directory, and there will be no file naming conflicts for
> active temporary files.
> Assuming I'm understanding my situation correctly, that solution would
> be
> great.
> >
> > something like:
> >
> > sysdir set tmpdir <my chosen temporary directory>
> When I try that I get:
> . sysdir set tmpdir     "C:\temp\"
> tmpdir not found
> And then:
> . sysdir list
> STATA:  C:\Program Files\Stata9\
> UPDATES:  C:\Program Files\Stata9\ado\updates\
> BASE:  C:\Program Files\Stata9\ado\base\
> SITE:  C:\Program Files\Stata9\ado\site\
> PLUS:  c:\ado\plus\
> PERSONAL:  c:\ado\personal\
> OLDPLACE:  c:\ado\
> So it doesn't look like tmpdir is something Stata knows about.  I
> guess it
> just uses whatever Windows sets as the temp directory (do you know if
> Stata uses TEMP or TMP offhand since I seem to have both defined by
> Windows?).
> If that is the case I guess I can set the Windows temp variable (once
> I
> figure out which one it is) to something specific for each of the
> Stata
> processes.
> I will of course report back if I have success with that.
> John
>  This communication is for informational purposes only. It is not
> intended to be, nor should it be construed or used as, financial,
> legal, tax or investment advice or an offer to sell, or a solicitation
> of any offer to buy, an interest in any fund advised by Ada Investment
> Management LP, the Investment advisor.  Any offer or solicitation of
> an investment in any of the Funds may be made only by delivery of such
> Funds confidential offering materials to authorized prospective
> investors.  An investment in any of the Funds is not suitable for all
> investors.  No representation is made that the Funds will or are
> likely to achieve their objectives, or that any investor will or is
> likely to achieve results comparable to those shown, or will make any
> profit at all or will be able to avoid incurring substantial losses. 
> Performance results are net of applicable fees, are unaudited and
> reflect reinvestment of income and profits.  Past performance is no
> guarantee of future results. All f!
>  inancial data and other information are not warranted as to
> completeness or accuracy and are subject to change without notice.
> Any comments or statements made herein do not necessarily reflect
> those of Ada Investment Management LP and its affiliates. This
> transmission may contain information that is confidential, legally
> privileged, and/or exempt from disclosure under applicable law. If you
> are not the intended recipient, you are hereby notified that any
> disclosure, copying, distribution, or use of the information contained
> herein (including any reliance thereon) is strictly prohibited. If you
> received this transmission in error, please immediately contact the
> sender and destroy the material in its entirety, whether in electronic
> or hard copy format.
> *
> *   For searches and help try:
> *
> *
> *
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index