|
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
RE: st: ordered directory
Nick, Austin - Thanks - I had forgotton about the "redirect" (>)
option.
Al
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of n j cox
Sent: Wednesday, September 26, 2007 9:09 AM
To: [email protected]
Subject: Re: st: ordered directory
One way of tackling this is by writing a wrapper command, say
program oscmd
version 8.2
tempfile foo
!`0' > `foo'
type `foo'
end
When you then type
. oscmd dir *.dta /od
Stata opens a temporary file, then opens up a shell in which your
arguments are executed and the results sent to a temporary file.
Stata finally types the file. More elaborate variants could be written
to process the file.
See also
http://www.stata.com/statalist/archive/2003-02/msg00217.html
Nick
[email protected]
Al Feiveson
------------------------------------------------------------------------
--------
Is it possible to obtain an ordered directory of files from within
Stata? For example in Windows using a command prompt, one can type
dir *.dta /o:d
to get a listing of files in order of modification date.
Apparently the -dir- comand in Stata does not take any sort options.
Also, typing
!dir *.dta /o:d
is useless because the output immediately disappears from the screen.
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/