Re: findfile on unix bug - help [message #27069 is a reply to message #26927] |
Thu, 04 October 2001 14:48   |
R.G.S.
Messages: 46 Registered: September 2000
|
Member |
|
|
William Thompson <thompson@orpheus.nascom.nasa.gov> wrote in message
news:9pikhd$pkb$1@skates.gsfc.nasa.gov...
> "R.G.S." <rgs1967@hotmail.com> writes:
>
>> Hi,
>
>
>
>> I have a problem running my code on a unix machine
>> (idlv5.4). The command is as follows:
>
>
>> files = findfile(subdirectory+'*.dat',count=num)
>
>> This does not give me the files in that subdirectory, rather it gives me
the
>> files in the current folder.
>
>> So now if I do the same command as:
>> files = findfile(subdirectory+'*',count=num)
>> I do get the entire listing. This is how I work around it,
>> however, it is possible that there are files other than the *.dat
>> and I want to filter on those. This works in win2000 nicely, so
>> what is the problem on the unix side?
>
> I've never seen this behavior on any Unix platform that I've used, and
can't
> replicate it with IDL/v5.4.1 on my Alpha/OSF workstation. Two things
occur to
> me:
>
> 1. The simplest answer is that the variable subdirectory is ending up as
a
> blank string. That would definitely cause the behavior you're seeing.
Have
> you verified that it contains what you think it contains?
It has been verified.
In fact, I can change the code to
cd,subdirectory
files = findfiles('*.dat')
and this works ( of course, I shudder at the thought of using code that
changes the current directory).
The problem is with the path somehow. (And the results can be pretty
weird, although I haven't nailed them down just yet. But I swear this
code worked last week.).
Thanks for the code. I'll check it out.
I am using this function on both window2000 machines as well as unix
(and soon a linux box). I wanted the cross platform compatibily so I
do not have different versions, hence the desire to use IDLs findfile.
Cheers,
bob
|
|
|