Hi Marcel,
You're welcome.
Just because the link file exists doesn't necessarily mean that the target file does. In your code sample, you assume that because the FILE() function returns .F. that it's a long file name, and call the ShortToLong() function I wrote. However, if that function doesn't find the file, it returns an empty string, which you don't check for. While I don't have too much experience with General fields, I'd suggest the following modification to your code:
llIsShort = ("~" $ lcfile)
IF llIsShort
lclongname = ShortToLong(lcfile)
ELSE
lclongname = lcfile
ENDIF
IF NOT EMPTY(lclongname) AND FILE(lclongname)
APPEND GENERAL GenField FILE (lclongname) LINK
MODIFY GENERAL GenField
ELSE
= MESSAGEBOX("The file " + lcfile + " does not exist!", 64, "File Not Found")
ENDIF
Naturally, the field "GenField" referenced above should be modified to reflect the field name in the table you're working with. If you get the messagebox, you'll know that the file doesn't exist.
hth,
George
Ubi caritas et amor, deus ibi est