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 #4445 is a reply to message #4444] Tue, 30 May 1995 00:00 Go to previous message
knipp is currently offline  knipp
Messages: 68
Registered: January 1993
Member
In article fsf@ruund7.fys.ruu.nl, wolf@ruund7.fys.ruu.nl (Wolf Wolfswinkel) writes:
> Hi,
>
> What is the best way to test for the existance of a file ? I can't
> find it in the manual. At the moment I use something like this :
>
> FUNCTION fexists, file
> ON_IOERROR, error
> openr,1,file
> close,1
> ; found the file
> return, 1
>
> error:
> ;can't open the file, so it's probably not there
> return,0
> end
>
> But there must be a much more elegant way, I think.
>
> Gr.
> Wolf
>
> --
> ===============================================
> \ /\ / Wolf Wolfswinkel
> \ / \ \/ /
> \/ \/\ /\ / W.Wolfswinkel@fys.ruu.nl
> \/ \/
>


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


Karl



------------------------------------------------------------ ------------

Karlheinz Knipp
knipp@ipi.uni-hannover.de

------------------------------------------------------------ ------------
[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: Tue Dec 02 23:27:10 PST 2025

Total time taken to generate the page: 3.36311 seconds