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: Searching for files with a particular *value* of a variable
From
Partho Sarkar <[email protected]>
To
[email protected]
Subject
st: Searching for files with a particular *value* of a variable
Date
Thu, 1 Mar 2012 11:53:45 +0530
Dear colleagues,
I need to search through a large number of files in a folder (with
subfolders) for the presence of a particular *value* of a variable. I
know (and have found very useful) the -lookfor_all- program ( by Zurab
Sajaia, Michael Lokshin and Dan Blanchette ) (SSC download) can find
occurences of variables, labels etc in a directory path. I also just
discovered Daniel Klein's -lookfor_val- (SSC download), which can
"Search for value patterns in *current* data set", but it doesn't
offer an option to search through a list of files . Can anyone here
suggest a way out?
[ I can think of a way to combine the above two utilities, using
-lookfor_all- to locate the files, and then -lookfor_val- to loop
through all the files thus found, and using the returned results for
each file to flag the matching files. But since -lookfor_all- does
not (as far as I can see) return the names of the files it finds in a
stored result (only displaying them on the screen), I cannot easily
think of a relatively simple process to get what I need by combining
the two programs. ]
Thanks & regards,
Partha S. Sarkar
Consultant Econometrician
Indicus Analytics Pvt. Ltd (www.indicus.net)
New Delhi, India
*
* 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/