Bookmark and Share

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]

SV: st: Windows 7 search inside do-file


From   Tomas Lind <[email protected]>
To   "[email protected]" <[email protected]>
Subject   SV: st: Windows 7 search inside do-file
Date   Fri, 9 Dec 2011 15:37:51 +0000

Thanks Dan for your kind and thorough advice.

 I will surely try your prefix command and check everything properly in the Windows dialog box as soon I can get help from our computer expert and administrator (maybe I simply missed the "Index Properties and File Contents"). 

/Tomas



-----Ursprungligt meddelande-----
Från: [email protected] [mailto:[email protected]] För Dan Blanchette
Skickat: den 9 december 2011 16:14
Till: [email protected]
Ämne: Re: st: Windows 7 search inside do-file

The user-written Stata command -find- can be made to search subdirectories by using the command I co-authored called -rcd- (recursively change directories):

  . ssc install find
  . ssc install rcd
  . rcd "C:\data"  : find *.do , match(some word or phrase) show

So, the above code will search the directory "C:\data" and all the subdirectories of "C:\data".

Windows 7 can somewhat find a word or set of words in a do-file.
You need to have the ".do" file types added to the list of file types listed in Indexing Options (under Control Panel). When you click on "Indexing Options" you then need to click on the Advanced button.  This requires administrator permission...which hopefully you have the ability to do things on your computer with administrator permissions.  Then click on the tab "File Types" and scroll down for "do" (add that file type if it is not there).  Then select "do"
and make sure "Index Properties and File Contents" is selected...
which is not the default.

Then in the Windows Explorer window you can type in the search box:

  contents: "something" *.do

If you type more than one word inside the double quotes, then Windows 7 considers that a list of words to search for not a specific phrase.  There is no option to do a case sensitive search.
And, by default the setting for searches is to search for partial matches not whole words.

Hope this helps,
Dan Blanchette

Research Programming Services
Carolina Population Center
University of North Carolina
Chapel Hill, NC 27516 USA
[email protected]


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

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index