comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » cd bug in IDL 5.5
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: cd bug in IDL 5.5 [message #31091 is a reply to message #31068] Mon, 17 June 2002 10:47 Go to previous message
crono15m is currently offline  crono15m
Messages: 9
Registered: June 2002
Junior Member
> another, perhaps, bug i have discovered is that the file_expand_path
> expands from the current working directory (not very handy :x ), not the
> actual directory where the file might be. It should issue a warning if that
> file does not exist in the current directory, something like:


I too have noticed that file_expand_path doesn't work the way you
would hope
it would. As a solution I wrote my own "search" program that looks for
a file
and returns the full path to it. It will look outside of the working
directory. It returns an array of all paths fitting 'filename'. It's
probably not perfect but it works.

Hope this helps,

Ben Hilldore
Hope College Nuclear Research Group

function getFilePath, filename
dirs = expand_path('+c:\', /all_dirs, /array)
filenames = strarr(n_elements(dirs))
for i = 0,n_elements(dirs)-1 do begin
filenames[i] = findfile(dirs[i] + '\' + filename)
endfor
return, filenames[where(strlen(filenames) gt 1)]
end
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Format codes in IDL
Next Topic: RSI Announces HDF5 Support -- Free IDL 5.5 Plug-in Available

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 10:29:48 PDT 2025

Total time taken to generate the page: 2.88154 seconds