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

Home » Public Forums » archive » Re: file_search windows problem
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: file_search windows problem [message #35070] Thu, 15 May 2003 04:00
Jacques Basson is currently offline  Jacques Basson
Messages: 17
Registered: May 1999
Junior Member
R.G. Stockwell wrote:
> "Jacques Basson" <basson@cyclopsNoSpAmnu.ac.za> wrote in message
> news:1052909384.778379@osprey.und.ac.za...
>
>> Hi all
>
> ...
>
>> IDL> print, findfile('C:\tmp\*B9*')
>> C:\tmp\123456789E.dat C:\tmp\1234567B9E.dat
>
> ...
>
>> Does anyone have any suggestion for a workaround?
>>
>> Cheers,
>> Jacques
>
>
>
> huh! weird, i've not noticed this behaviour before. I might even say
> it's a bug. Certainly performs counterintuitively.
>
> Anyways, an obvious solution is just to select the files from your returned
> array yourself
> (with perhaps a strupcas() if you want case independence)
>
> files = findfile('C:\tmp\*B9*')
> w = where(strpos(strupcase(files),'B9') gt 0,count)
> if count gt 0 then files=files[w] else files='NULL'
> print,files
>
>
> Cheers,
> bob
>

In some circles it would be called a "feature" rather than a bug... I
was hoping that there may be a more elegant solution than searching the
returned array, but I'll go with that for now.

Thanks,
Jacques
Re: file_search windows problem [message #35089 is a reply to message #35070] Wed, 14 May 2003 07:27 Go to previous message
R.G. Stockwell is currently offline  R.G. Stockwell
Messages: 363
Registered: July 1999
Senior Member
"Jacques Basson" <basson@cyclopsNoSpAmnu.ac.za> wrote in message
news:1052909384.778379@osprey.und.ac.za...
> Hi all
...
> IDL> print, findfile('C:\tmp\*B9*')
> C:\tmp\123456789E.dat C:\tmp\1234567B9E.dat
...
> Does anyone have any suggestion for a workaround?
>
> Cheers,
> Jacques


huh! weird, i've not noticed this behaviour before. I might even say
it's a bug. Certainly performs counterintuitively.

Anyways, an obvious solution is just to select the files from your returned
array yourself
(with perhaps a strupcas() if you want case independence)

files = findfile('C:\tmp\*B9*')
w = where(strpos(strupcase(files),'B9') gt 0,count)
if count gt 0 then files=files[w] else files='NULL'
print,files


Cheers,
bob
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: ROI with IDLanROI & IDLgrROI
Next Topic: Re: RFC 1: Common functions for beginners

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

Current Time: Wed Oct 08 13:55:45 PDT 2025

Total time taken to generate the page: 0.00295 seconds