Page 1 of 1 1
Topic Options
#160200 - 2006-04-03 02:45 AM Problem with Exist when using *.* ?
Gaven Offline
Starting to like KiXtart
*

Registered: 2003-06-19
Posts: 103
Loc: Washinton DC, USA
Say the directory c:\files exists and is empty.

The function Exist("c:\files\*.*") returns true even when there are no files in the directory. I'm thinking the current and parent directory references are what's throwing the function. Can this be fixed?

Top
#160201 - 2006-04-03 04:20 AM Re: Problem with Exist when using *.* ?
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11629
Loc: CA
Well it's because it is searching for both file or folder which are not the same.
If you really don't wish to code around this then I'd suggest this request be posted in the SUGGESTIONS forum where it could be more easily seen by Ruud
and possibly be incorporated into future versions.

In the meantime one could do some thing similar to this.

Code:

If GetFileAttr($Name) & 16
;folder exists
EndIf


 
 
 
There is also this UDF
 
EmptyFolder() - checks if folder is empty
http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=83104
 

Top
Page 1 of 1 1


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1376 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.052 seconds in which 0.026 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org