Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: searching for files in different subdirectories


From   Dan Blanchette <dan_blanchette@unc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: searching for files in different subdirectories
Date   Thu, 5 Jul 2012 17:54:22 -0400 (EDT)

Marcos,

I am a co-author of a command available from SSC
called -rcd- (recursively change directories).
It is a pre-fix command so you can run Stata commands
after it.

 . ssc install rcd

Then this might do what you want:

 . rcd C:\data\ , verbose : dir "*ab*.dta"

The verbose option will display what directory -rcd- is in
when it runs the dir command.

Hope this helps,
Dan Blanchette

Research Programming Services
Carolina Population Center
University of North Carolina
Dan_Blanchette@unc.edu


*
*   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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index