Re: cd bug in IDL 5.5 [message #31039] |
Wed, 05 June 2002 00:36  |
Wolfgang.Dobler
Messages: 4 Registered: April 2002
|
Junior Member |
|
|
Reimar Bauer <r.bauer@fz-juelich.de> writes:
>> Has anybody encountered this one before:
>>
>> idl> cd, '../../..'
>>
>> only moves one directory up under IDL 5.5 (5.4 was OK).
>
> you can use file_expand_path('../../../idl')
>
>
> The FILE_EXPAND_PATH function expands a given file or partial directory
> name to its fully qualified name regardless of the current working
> directory.
Thanks, that's exactly what I needed!
I first tried EXPAND_PATH, but that one just confirms the bug:
idl> print, expand_path('../../../idl')
../idl
W o l f g a n g
--
------------------------------------------------------------ ----
| Wolfgang Dobler, Kiepenheuer Institute for Solar Physics |
| http://www.kis.uni-freiburg.de/~dobler/ |
------------------------------------------------------------ ----
|
|
|
|
|
|
|
Re: cd bug in IDL 5.5 [message #31098 is a reply to message #31042] |
Sat, 15 June 2002 18:23  |
G Karas
Messages: 12 Registered: March 2002
|
Junior Member |
|
|
After noticing that bug a month or so ago, I just split it into consecutive
cd ../ statements, like
for i = 0, x ; x you set or calculate depending how many levels you have
gone deep
cd, '../'
endfor
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:
a = '...../blahblah.bla'
cd, 'elsewhere'
ia = file_info(a, /noexpand_path)
if ia.exists NE 1 then print, 'File not found in current directory,
file_expand_path disabled'
or something like that...
cheers!
Giorgos Karas
"Reimar Bauer" <r.bauer@fz-juelich.de> wrote in message
news:3CFD246B.AB44B20C@fz-juelich.de...
> Dick Jackson wrote:
>>
>> <Wolfgang.Dobler@kis.uni-freiburg.de> wrote in message
>> news:yg7it50v0rv.fsf@cincinnatus.kis.uni-freiburg.de...
>>> Has anybody encountered this one before:
>>>
>>> idl> cd, '../../..'
>>>
>>> only moves one directory up under IDL 5.5 (5.4 was OK).
>>
>> Since no one else has done so, I'll just chime in to say I'm *not*
seeing
>> this problem with IDL 5.5 under Windows 2000. Are these problems seen on
>> Unix only?
>
> That's right. I sent a few months ago this bug request to CREASO.
>
> Cia
>
> Reimar
>>
>> Cheers,
>> --
>> -Dick
>>
>> Dick Jackson / dick@d-jackson.com
>> D-Jackson Software Consulting / http://www.d-jackson.com
>> Calgary, Alberta, Canada / +1-403-242-7398 / Fax: 241-7392
>
> --
> 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
> ============================================================ =======
|
|
|