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 #30529 is a reply to message #30150] Sun, 05 May 2002 11:32 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Dear all,

as I remember correctly findfile is an obsolete routine since idl5.5.
The new routine is file_search.

With this routine a lot of find_file problems are solved.

regards
Reimar




William Thompson wrote:
>
> 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

--
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
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: Sat Oct 11 07:08:53 PDT 2025

Total time taken to generate the page: 0.54968 seconds