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

Home » Public Forums » archive » Findfile finds no files
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: Findfile finds no files [message #30150 is a reply to message #30056] Fri, 05 April 2002 12:17 Go to previous messageGo to previous message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
Stein Vidar Hagfors Haugan <shaugan@esa.nascom.nasa.gov> writes:

> Pete Riley <uk2@mac.com> writes:

>> Hi,
>>
>> I just came across a weird problem I'm not sure if it's been talked about
>> before. I'm using IDL 5.5 on linux RH 7.2. I ran some code which calls
>> findfile() last week and everything worked out fine. Today, it returns no
>> files, even with
>>
>> Print,findfile('*')
>>
>> Yet $ls shows all the files in the current directory.
>>
>> Has anyone come across this?

> I think I came across something similar a loong time ago, on various
> unix systems. The problem arises when you have extremely many (long)
> file names matching the pattern. The reason is that findfile uses
> (used?) the "ls <pattern>" command, resulting in a file-name
> expansion that causes an error with too long command lines.

> Note: If I'm correct, I think you'll get all of the files by using
> findfile with no arguments (i.e. spawning an ls command with no
> filename expansion of the command line)!

> The only way I've found around it is to write a separate find_file
> function that uses e.g. "find -name '<pattern>' -print" on unix systems.

> --
> ------------------------------------------------------------ --------------
> Stein Vidar Hagfors Haugan
> ESA SOHO SOC/European Space Agency Science Operations Coordinator for SOHO

> NASA Goddard Space Flight Center, Email: shaugan@esa.nascom.nasa.gov
> Mail Code 682.3, Bld. 26, Room G-1, Tel.: 1-301-286-9028/240-354-6066
> Greenbelt, Maryland 20771, USA. Fax: 1-301-286-0264
> ------------------------------------------------------------ --------------


Pete:

The behavior you describe is the exact symptom of the problem that Stein Vidar
refers to. You can find Stein Vidar's find_file.pro procedure at

ftp://sohoftp.nascom.nasa.gov/solarsoft/gen/idl/system/

I've gotten into the habit of using that instead of the built-in findfile.

William Thompson
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: color bar..
Next Topic: Re: drawing lines interactively

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

Current Time: Wed Oct 08 18:43:23 PDT 2025

Total time taken to generate the page: 0.00604 seconds