From: Roger Lawton on
I am (finally) implementing VO 2.8 SP3 and I am having a problem with the
File() function. In our app we would check for the existance of (any) files
in a directory using something like the following:

cPath := "C:\MYDIRECTORY\*.*"

If File( cPath )
// do something
Else
// do something else
Endif

However, with the update to SP3 I have found that File(cPath) never returns
true when using *.* as the "template". Is there somehing I am missing or is
this the case?

Thanks

--
Roger Lawton
Product Manager
SOMAX, Inc.

From: Karl Faller on
Roger,
seems there's a problem - just tried and it finds all iterations of ?
and * with charakters, but not *.*

Karl

>I am (finally) implementing VO 2.8 SP3 and I am having a problem with the
>File() function. In our app we would check for the existance of (any) files
>in a directory using something like the following:
>
>cPath := "C:\MYDIRECTORY\*.*"
>
>If File( cPath )
> // do something
>Else
> // do something else
>Endif
>
>However, with the update to SP3 I have found that File(cPath) never returns
>true when using *.* as the "template". Is there somehing I am missing or is
>this the case?
>
>Thanks
From: Roger Lawton on
Karl:

Thanks for the reply. Thought I was going crazy for a while.


--
Roger Lawton
Product Manager
SOMAX, Inc.


"Karl Faller" <k.faller_withoutthat_(a)onlinehome.de> wrote in message
news:cg8o565h99tqescib1ase9b0uh3c1kgsin(a)4ax.com...
> Roger,
> seems there's a problem - just tried and it finds all iterations of ?
> and * with charakters, but not *.*
>
> Karl
>
>>I am (finally) implementing VO 2.8 SP3 and I am having a problem with the
>>File() function. In our app we would check for the existance of (any)
>>files
>>in a directory using something like the following:
>>
>>cPath := "C:\MYDIRECTORY\*.*"
>>
>>If File( cPath )
>> // do something
>>Else
>> // do something else
>>Endif
>>
>>However, with the update to SP3 I have found that File(cPath) never
>>returns
>>true when using *.* as the "template". Is there somehing I am missing or
>>is
>>this the case?
>>
>>Thanks

From: Karl Faller on
Roger
>Thought I was going crazy for a while.
<G> - know that feeling, and not only with VO...

Karl
From: Urs Eggmann on
Hi Roger,
In my tests File() never worked correctly! With SP1 it returns allways true,
with SP3 allways false (!?!?!?)

Little workaround with Directory():

METHOD pbFile() CLASS dtaTest1
? File("C:\CAVO28\EmptyDirectory\*.*")
? Directory( "C:\CAVO28\EmptyDirectory\*.*")
? ALen( Directory( "C:\CAVO28\EmptyDirectory\*.*") )
?
? File("C:\CAVO28\NotEmptyDirectory\*.*")
? Directory( "C:\CAVO28\NotEmptyDirectory\*.*")
? ALen( Directory( "C:\CAVO28\NotEmptyDirectory\*.*") )

regards
Urs


"Roger Lawton" <nsproger(a)nspsomax.com> schrieb im Newsbeitrag
news:i3h8ir$jfg$1(a)speranza.aioe.org...
> Karl:
>
> Thanks for the reply. Thought I was going crazy for a while.
>
>
> --
> Roger Lawton
> Product Manager
> SOMAX, Inc.
>
>
> "Karl Faller" <k.faller_withoutthat_(a)onlinehome.de> wrote in message
> news:cg8o565h99tqescib1ase9b0uh3c1kgsin(a)4ax.com...
>> Roger,
>> seems there's a problem - just tried and it finds all iterations of ?
>> and * with charakters, but not *.*
>>
>> Karl
>>
>>>I am (finally) implementing VO 2.8 SP3 and I am having a problem with the
>>>File() function. In our app we would check for the existance of (any)
>>>files
>>>in a directory using something like the following:
>>>
>>>cPath := "C:\MYDIRECTORY\*.*"
>>>
>>>If File( cPath )
>>> // do something
>>>Else
>>> // do something else
>>>Endif
>>>
>>>However, with the update to SP3 I have found that File(cPath) never
>>>returns
>>>true when using *.* as the "template". Is there somehing I am missing or
>>>is
>>>this the case?
>>>
>>>Thanks
>