*! v0.0.1 2017-11-27 Scott Long

// list do files click to run

capture program drop doit
program define doit
    version 13.0
    syntax [ anything] [ , DETails DIRectories DELete hold]

    local dospec : subinstr local anything ".do" "", all
    if "`dospec'"=="" local dospec "*"

    local dofiles : dir "`c(pwd)'" files "`dospec'.do"

    display as text " "
    foreach file in `dofiles' {
        local nspaces = 2
        di `"{space `nspaces'}{stata do `file':`file'}"'
    } // file loop

end
exit