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 #30056 is a reply to message #29979] Wed, 03 April 2002 12:05 Go to previous messageGo to previous message
Stein Vidar Hagfors H[1] is currently offline  Stein Vidar Hagfors H[1]
Messages: 56
Registered: February 2000
Member
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
------------------------------------------------------------ --------------
[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: Sun Oct 12 10:03:18 PDT 2025

Total time taken to generate the page: 2.23982 seconds