Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Which program/tool/app can search within do files?

    Hi, I am looking for a search app that would 'see' into do files. The search tools I use all skip the do files, so when I try to find something I have somewhere in some old do files in some folder who-knows-where, I am unable to do so. Do you know of any such search tools, free or paid? thanks so much!

  • #2
    TextPad, a shareware text editor popular with some Stata users, has a reasonably full-featured "search in files" function. Doubtless other popular text editors can do this, too.

    Comment


    • #3
      Do-files contain just plain ASCII (well, nowadays unicode). You can use Stata to search in do-files. Say you are looking for the word "foo" in the do-file foobar.do. You could

      Code:
      clear
      set obs 1
      generate file = fileread("foobar.do")
      generate foo = strpos(file, "foo")
      Best
      Daniel

      Comment

      Working...
      X