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

Home » Public Forums » archive » filename check
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: filename check [message #22218 is a reply to message #22084] Tue, 24 October 2000 00:00 Go to previous messageGo to previous message
Edward Max Pottasch is currently offline  Edward Max Pottasch
Messages: 3
Registered: October 2000
Junior Member
Stuart Colley <src@star.ucl.ac.uk> wrote in message
news:Pine.OSF.3.96.1001024143333.20360F-100000@zuaxp7.star.u cl.ac.uk...
>
> Can anyone suggest a way to check that a file exists before attempting to
> read from it, since the error messages obtained from trying to read from a
> non-existing file, don't make it clear that file doesn't exist.
>
> cheers,
> S
>


hi Stuart,

my way of IDL programming is rather simple since I am only familiar with the
older versions of IDL (v.3.4.1). Anyway this works for me:

ciao, Ed



fn='filename'

; check if file exists
ff=FINDFILE(fn)

IF (ff(0) EQ fn) THEN BEGIN

; do your stuff

ENDIF
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: ENVI slope function
Next Topic: Re: HELP: How to read 10-bit image file

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

Current Time: Sat Oct 11 15:27:22 PDT 2025

Total time taken to generate the page: 1.43586 seconds