Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Getting number of files via -fs-
From
Partho Sarkar <[email protected]>
To
[email protected]
Subject
Re: st: Getting number of files via -fs-
Date
Wed, 7 Mar 2012 14:09:43 +0530
Ok, I found a way- using the inbuilt -dir- command instead of -fs-
//
local list:dir . files "*"
local numfiles : word count `list'
di "`numfiles'"
//
A similar issue was discussed here:
http://www.stata.com/statalist/archive/2008-02/msg00708.html ,and Nick
suggested trying dir!
[ Still, funny about these quotes in Stata!]
Partho
On Wed, Mar 7, 2012 at 1:46 PM, Partho Sarkar <[email protected]> wrote:
> I am using Nick Cox's -fs- utility to automate a recurrent append
> files operation (that part works like a charm!) As a part of this, I
> now need to keep track of of the number of files processed. For
> some reason, I simply cannot get this part right. Here is what I
> tried (there are 7 (seven) files in the directory):
<snipped>
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/