The FILE_EXPAND_PATH function expands a given file or partial directory name to its fully qualified name regardless of the current working directory.
| Note |
A = FILE_EXPAND_PATH(FINDFILE('*.pro'))
Alternatively, use the FILE_SEARCH function with the FULLY_QUALIFY_PATH keyword:
A = FILE_SEARCH('*.pro', /FULLY_QUALIFY_PATH)
Result = FILE_EXPAND_PATH (Path)
FILE_EXPAND_PATH returns a fully qualified file path that completely specifies the location of Path without the need to consider the user's current working directory.
A scalar or array of file or directory names to be fully qualified.
None.
In this example, we change directories to the IDL lib directory and expand the file path for the DIST function:
cd, FILEPATH('', SUBDIRECTORY=['lib']) print, FILE_EXPAND_PATH('dist.pro')
This results in the following if run on a UNIX system:
/usr/local/rsi/idl_5.4/lib/dist.pro
Introduced: 5.4