Re: How to look up the directory tree for calling external DLLs? [message #75394] |
Tue, 01 March 2011 19:27 |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
On 3/1/11 7:11 PM, David Fanning wrote:
> James writes:
>
>> Does anyone know how to solve this problem? I messed around with
>> FILE_SEARCH and FILEPATH a bit, but they have not helped so far.
>> FILE_SEARCH has a and FILEPATH only works for files that are within
>> the IDL root folder.
>
> FILEPATH doesn't just work for files in the IDL root folder.
> Use the ROOT_DIR keyword to direct it anywhere you like.
>
> I find File_Resource_File handy for locating any kind of
> a file in any directory that is on the IDL path:
>
> http://www.idlcoyote.com/programs/find_resource_file.pro
I agree that some type of routine like David's FIND_RESOURCE_FILE is
extremely useful. Also, note that you can expand notation like '~' and
'..' using FILE_EXPAND_PATH:
IDL> $pwd
/Users/mgalloy/projects/idllib/src
IDL> print, file_expand_path('../..')
/Users/mgalloy/projects
Mike
--
www.michaelgalloy.com
Research Mathematician
Tech-X Corporation
|
|
|
|
|