>Hello,
>I was wondering if anybody had a good way to check for a locked file? I am moving a list of files, and can't have the error message pop up when I don't have access to one of them. Thanks for the help!
>
>MAC
Mike,
you can open each file with UDF usefile(myfile)
my_file = 'd:\all_zapl\b_data\allvar'
lopen = USEFILE(my_file)
IF lopen
MESSAGEBOX('All is Ok')
ELSE
MESSAGEBOX('Bad news')
ENDIF
FUNCTION USEFILE(open_file)
LOCAL lretval
TRY
USE (open_file)
lretval = .t.
CATCH
ENDTRY
RETURN lretval
HTH
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst