I know that this may not be ideal, but have you tried getfiletime() function. I believe it will return "" if the file is in use.

code:
if getfiletime($file) = ""
;file in use
else
;file not in use
endif

_________________________
Eric