Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check if a file exists
Message
From
04/05/2004 09:44:12
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00900659
Message ID:
00900684
Views:
7
>Gregory,
>
>The ADIR() function retuns # of files found so in your code ALEN() will fail always.
return  adir(aa, FileName, 'DHS') > 0
>
><snip>
>>
>>*--------------------------------------------------------------------------
>>Function	FileExists(FileName)
>>
>> 	return  (alen(adir(aa, FileName, 'DHS')) > 0)
>>endfunc
>>*--------------------------------------------------------------------------
>>
>>

Sergey,

you are right of course. I usually test the code prior to sending it. This time, I did not. Hence, the error

should be
return  ( adir(aa, FileName, 'DHS') > 0)
Gregory
Previous
Reply
Map
View

Click here to load this message in the networking platform