*! v0.1.0 2018-08-03 Scott Long
* v0.0.1 2017-11-27 Scott Long

//  doit.ado: list do-files in working directory; click to execute
//  jslong@iu.edu - Scott Long

program define doit
    version 13.0
    syntax [ anything]

    local filespec : subinstr local anything ".do" "", all
    if "`filespec'"=="" local filespec "*"
    local filelist : dir "`c(pwd)'" files "`filespec'.do"

    foreach file in `filelist' {
        display `"{stata do `file':`file'}"'
    }

end
exit