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]
st: -filelist- available on SSC
From
Robert Picard <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: -filelist- available on SSC
Date
Mon, 4 Nov 2013 10:03:19 -0500
Thanks to Kit Baum, -filelist- is now available from SSC and can be
installed using -ssc install filelist-.
-filelist- searches a directory and recursively all its subdirectories
for files and creates a Stata dataset with the file names and
directory paths of each file found. Specific types of files can be
targeted by searching for filenames using a pattern that conforms to
-strmatch()- (e.g. "*.dta").
-filelist- is very fast and can index very large directories. A
complete listing of Stata 13's 10K files takes less than a second on a
MacBook Air.
The help file for -filelist- contains an example of how to cycle
through each file in the dataset of files found.
This version of -filelist- is a much improved version of a program I
offered in the following post on Statalist:
http://www.stata.com/statalist/archive/2013-10/msg01058.html
in response to a request from Tim Evans:
http://www.stata.com/statalist/archive/2013-10/msg01014.html
The help file example is derived from the sample code that I posted
that shows a technique to loop through every observation of a dataset
that contains file names:
http://www.stata.com/statalist/archive/2013-10/msg01109.html
Robert
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/