Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Does a subfolder exist?

Oct
19
0
iff %@filesize["m:\taqDAILYNBBO\%@substr[%x,16]"] == -1 then

does -1 indicate that the folder does not exist?
 
From: JP Software Forums [mailto:[email protected]]
Sent: Thursday, November 06, 2008 9:28 AM
Subject: RE: [Support-t-593] Re: Does a subfolder exist?

>
> ---Quote (Originally by rawood11)---
> > iff %@filesize["m:\taqDAILYNBBO\%@substr[%x,16]"] == -1 then
> >
> > does -1 indicate that the folder does not exist?
>
> Yes (0 means that the file(s) exist but are 0-length).

No! Not necessarily. A return value of -1 could mean that the folder exists
but doesn't contain the specified file. Generally, it isn't possible to tell
from %@FILESIZE whether the *folder* exists. Check out the ISDIR operator --

iff isdir m:\taqDAILYNBBO then
...
endiff

Jonathan Gilbert
 

Similar threads

Back
Top