in reply to File::Copy moving halfway written files
This is discussed at Detecting An Open File. Does that Q&A not answer your questionn?