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 #31075 is a reply to message #31068] Tue, 18 June 2002 09:51 Go to previous messageGo to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Ben wrote:
>
>> Dear Ben,
>>
>> it could be easier to use file_which
>>
>> x=file_which('mean.pro')
>> print,x
>> /usr/local/idl/idl/lib/mean.pro
>>
>> fpe=file_path_name_ext(x)
>>
>> print,fpe.path
>> /usr/local/idl/idl/lib/
>
>
> Reimar,
> You're right, if file_which worked correctly it would be easier (and faster)
> to use. Unfortunately, in win2k it doesn't seem to work right. Here are some
> examples.
>
> If you are in the IDL working directory it works fine.
> IDL> print, file_which('copyToClipboard.exe')
> C:\BEN_HILLDORE\KVI\KVI_PROGRAMS\Support Programs\copyToClipboard.exe
>
> Now i'll move that file to 'c:\gs'
>
> IDL> print, file_which('c:\', 'copyToClipboard.exe')
> It returns a null.
>
> If I specify the path directly to it, it works.
>
> IDL> print, file_which('c:\gs', 'copyToClipboard.exe')
> c:\gs\copyToClipboard.exe
>
> This routine seems to suffer from the same problem as expand_file_path.


Dear Ben,

this is correct, but I agree it's really bad described.

I will do a feature request for using an array of pathes
without concatination by strjoin.

I have this tested on unix and I hope I have transformed this right
for windows.

path=get_dir_tree('c:\',level=10)
path='c:\'+path
path=strjoin(path,';') ; it's : on unix

print,file_which(path,'copyToClipboard.exe')
c:\gs\copyToClipboard.exe


http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/download/get_dir_tree.tar.gz

hope this helps.

Reimar



>
> Ben Hilldore
> Hope College Nuclear Research Group

--
Reimar Bauer

Institut fuer Stratosphaerische Chemie (ICG-I)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
------------------------------------------------------------ -------
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml
============================================================ =======
[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: Wed Dec 03 21:46:11 PST 2025

Total time taken to generate the page: 0.24105 seconds