Monthly Archives: March 2013

How To / STATA: Check if a File Exists Before Opening It

The STATA’s command –capture- allows you to check if the file that you are trying to open exists. This command evaluates whether or not the file is in the folder you are using. Then, –capture- assigns a value to the macro _rc depending on whether the file is in the folder or not. Therefore, we can use the value of _rc to continue with our STATA’s script.

Continue reading