If I perform the copy alone or the deletion alone, then everything works fine. If I perform the deletion *following* the copy, it is only then that I get the 550 error problem. Seems like the copy operation creates some sort of dangling lock on the file that doesn't go away for the deletion to operate normally.
Has anyone ever experienced this or a similar problem? Does anyone have a clue?
So, as I told you above, I am attempting to programmatically back up files lying in a folder in a Windows 2000 machine, by way of Java (Apache Commons/Net library). The Java code runs on a remote server (actually an AS/400 one) and accesses the Win2K machine, attempting to (i) copy the files to a backup folder on the Win2K machine and (ii) delete the original files. When the program merely copies or merely deletes the files, it works fine. However, if it first copies the files and subsequently attempts to delete them, deletion fails with a 550 FTP error:
"The process cannot access the file because it is being used by another process."
Running the "handle" utility on the target machine I got the following:
Does anyone have a clue as to why this handle is held on the file, long after the copy file operation has been completed? It is this lock held that apparently prevents file deletion and results in a 550 error.... What should I do to overcome this problem? Thx!
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop