Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Temp files


From   Dan Blanchette <[email protected]>
To   [email protected]
Subject   st: RE: Temp files
Date   Thu, 22 Jan 2004 16:07:52 -0500 (EST)

Stata will let you list files using the star wild card but
it won't let you delete or copy using wild cards.
So perhaps you should shell out to a prompt and delete the files:

. ! del *.tmp


There's a program on the SSC archive -tmpdir- that I wrote that finds your
temp directory and returns it in macro variable "r(tmpdir)".
So you could use -tmpdir- and then erase the files like so in the Windows
operating system:

. tmpdir
. // make sure the right files are going to be deleted
. dir `r(tmpdir)'/*.tmp
. ! del `r(tmpdir)'/*.tmp

The temporary files in Unix and Linux do not have tmp file extensions.
These files start with S (for Stata?).

. tmpdir
. // make sure the right files are going to be deleted
. dir `r(tmpdir)'/S*
. ! rm `r(tmpdir)'/S*


Hope this helps.

dan

********************************



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index