Re: How check for "path/file exists"?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Kat,

Ok, I did consider that, but thought there might be a better or more
"elegant" way.  Thanks.

Dan


----- Original Message -----
From: "Kat" <gertie at PELL.NET>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Sunday, September 03, 2000 8:35 PM
Subject: Re: How check for "path/file exists"?


> On 3 Sep 2000, at 19:13, Dan B Moyer wrote:
>
> > Wolf, all,
> >
> > How can I check for whether a specified "path/file" exists??
> >
> > I'm trying to use Wolf's "jumpto" (or perhaps his "ShellExecute2") to
run
> > another program from within my program (to jump to it); when this is a
> > program with a "stable" path, no problem.  But I'm wanting to be able to
> > jump to Wolf's tutorial, which isn't always at a known place in the
Euphoria
> > folder, so I need to be able to *test* for whether the path/file I
> > tentatively specify actually exists or not, so I can activate the "open
> > file" dialog if it doesn't.
> >
> > I changed Wolf's "jumpto" to a function, thinking to use the return as a
> > test, but while it worked if the path was correct, when the path/file
wasn't
> > correct it just bombed & output an error message about "can't open
file".
> >
> > Any thoughts?
>
> Try opening the file for a read before you try to exec it. If it cannot be
opened, then it's
> not there or it's locked,, either way, you can't run it.
>
> Kat

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu