FILE function is not exacly reliable, it was discussed here before. You better use adir and check for adir(laFiles,'c:\winnt\fonts\code39two.ttf')>0 There was another suggestion in this thread, but I have to find it first.
Ok, here is one thread: Forum: Visual FoxPro Category: Coding, syntax & commands Title: Re: Verifying the existence of a file Thread #
547744 Message #
547827>I'm running the folloiwng:
>
>chkfile = 'c:\winnt\fonts\code39two.ttf'
>
>if file(chkfile)
> **notify users with wait window
> return
>endif
>
>The problem is that the user is notified with the wait window like it's always finding the file. Even after I delete teh file. It still seems that it's finding it somehow...
>
>When I step through the code and enter file(chkfile) in the watch window, it shows a value of .f. but it's still falling thorugh like it's .t.
>
>Any ideas from anyone?
If it's not broken, fix it until it is.
My Blog