Does a subfolder exist?

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
May 30, 2008
42
0
#3
From: JP Software Forums [mailto:neil@jpsoft.com]
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