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

Home » Public Forums » archive » Re: File test
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: File test [message #4444 is a reply to message #4430] Tue, 30 May 1995 00:00 Go to previous messageGo to previous message
hahn is currently offline  hahn
Messages: 108
Registered: November 1993
Senior Member
In article <1995May30.083524.18717@newsserver.rrzn.uni-hannover.de> knipp@ipi.uni-hannover.de (K Knipp) writes:

> found = findfile(FILENAME) ne "" ; FILENAME WITHOUT WILDCARD
> ; found will either be 0 or 1


Although this works I recommend to use findfile with the optional parameter
count and check this value: Findfile returns a string array with one element
per file or directory. So, if FILENAME is ambigous, you cannot compare it to
a null string.

BTW: If you enter wild card characters as argument the result returned depends
on the operating system. Using findfile in IDL for Windows the result is:

IDL> fl = findfile('d:\idl\*.*', count=nd)
IDL>print, nd
25
IDL> print, fl
d:\idl\.\
d:\idl\..\
d:\idl\HELP\
d:\idl\MAPS\
[ lines deleted]
d:\idl\EXPORT.H
d:\idl\DOSPRMPT.PIF
[remainder deleted]

While running under OSF/1 you get uxlis = findfile('$IDL_DIR/*', count=cn)
260 files and uxlis contains
/afs/software/idl/axp361/Idl
/afs/software/idl/axp361/README
/afs/software/idl/axp361/RELEASE_LEVEL
/afs/software/idl/axp361/colors1.tbl
/afs/software/idl/axp361/envi_setup
/afs/software/idl/axp361/envi_setup.ksh
[remainder deleted]

As you see all subdirectories are traversed, similar to the Unix find
command.

Norbert Hahn
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Spearman rank coeff significance?
Next Topic: IDL alternatives?

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

Current Time: Fri Oct 17 15:31:00 PDT 2025

Total time taken to generate the page: 1.36014 seconds