*! v0.1.0 2018-08-03 Scott Long

//  ultit.ado: ultraedit do and ado files working directory; click to edit
//  jslong@iu.edu - Scott Long

program define ultit
    version 13.0
    syntax [ anything]

    local dospec : subinstr local anything ".do" "", all
    local adospec : subinstr local anything ".ado" "", all

    if "`dospec'"=="" & "`adospec'"=="" {
        local dospec "*"
        local adospec "*"
    }
    local dofiles : dir "`c(pwd)'" files "`dospec'.do"
    local adofiles : dir "`c(pwd)'" files "`adospec'.ado"
    local filelist `"`dofiles' `adofiles'"'
    local filelist : list sort filelist

    foreach file in `filelist' {
      display `"{stata !uedit64 `file':`file'}"'
      %display `"{stata !"C:/Program Files/IDM Computer Solutions/UltraEdit/uedit64 `file'":`file'}"'
    }

end
exit