*! ecmd ver 1.0 13feb2005
*! Opens command log in a Do-file editor window
*! Author: Svend Juul

program ecmd
version 9
quietly cmdlog

if "`r(filename)'" == "" {
   display as error "No command log file"
}

else {
   copy "`r(filename)'"  "C:\_cmd.log", replace
   doedit "C:\_cmd.log"
}

end