Title
getfilename2 -- Improved Utility for handling filename specifications
Syntax
getfilename2 `"path-filename"'
Description
getfilename2 adds a few new features to the _getfilename command. In addition to returning the filename in r(filename), it also returns the path in r(path), the root (filename without the extension) in r(root), and the extension in r(ext).
Example
. getfilename2 c:\Program Files\Stata9\ado\base\a\auto.dta r(filename): auto.dta r(path): c:\Program Files\Stata9\ado\base\a r(root): auto r(ext): dta
Author
Jeffrey Arnold Payments Studies Function, Federal Reserve Bank of New York jeffrey.arnold@ny.frb.org
Also see
Online: _getfilename, dir, findfile, macro, sysdir