result = FILE_TEST (
See here:
http://idlastro.gsfc.nasa.gov/idl_html_help/FILE_TEST.html
Look at this nightmarish way this person did it:
http://www.astro.washington.edu/docs/idl/cgi-bin/getpro/library27.html?DIR_EXIST
Another very difficult way to do this would have been to use FILE_INFO:
http://idlastro.gsfc.nasa.gov/idl_html_help/FILE_INFO.html