Confirms if directory exists
confirmdir full direcotory name
confirmdir is designed for programmers who want to know if a directory exists. This is just like confirm command when used to confirm a file. If Stata allowed their confirm command to also have the "dir" option, this program would not have been written. Stata's confirm file will confirm a directory in UNIX/Linux but not in Windows. confirmdir works in all operating systems.
. confirmdir "c:\My Favorite Directory\Where I Keep Stuff\"
. confirmdir /projects/ethiopia/survey2002/data/
The confirmdir command saves in r(): Macros r(confirmdir) return code returned by the cd command.
Dan Blanchette The Carolina Population Center University of North Carolina - Chapel Hill, USA firstname.lastname@example.org
On-line: confirm cd, tmpdir (if installed)