The syntax should work.
You tried:
? FILE("c:\lables\labelfile")
and it does work, but
lcFileName = "c:\lables\labelfile"
? FILE(lcFileName)
does not?
Is everything spelled right and don't you need an extension to labelfile? (i.e. you need the fullname including extension to have FILE() return .T.)
>>>>>>>>>>>>
>I have to use the file() function but I can't hard code the name and path as I don't know what it is until run time.
>
>When I try to store the path and file name to a variable and then put the variable in the file() function it always returns true.
>
>Something like this:
>
>lcFileName = "c:\lables\labelfile"
>
>?file(lcFileName)
>
>Gives me false, but I know that file exists in that directory.
>
>Any suggestions?
>>>>>>>>>>>>