Question

I have an automated test running on my program that generates some large MPG files along with other files. After running the test, I have the script clean up after itself. The other files (a mix of binary and text files) are removed with no problems. The MPG files, however, don't get deleted. If I try and manually delete the MPG files from explorer after the test has run, they are removed from the explorer window only to reappear a few seconds later. Process explorer shows that they are being used by explorer.exe. Eventually, I am able to remove these files. Any idea why this is happening?

Was it helpful?

Solution

Is it possible that Explorer is holding onto the files to generate thumbs.db and perform its other work? I ask that because I've noticed considerable lag as Explorer evaluates every movie file in my media directories, even when in Details view. (You can tell, because the address bar of that Explorer window will become a progress bar, slowly -- ever so slowly on my box at home -- turning green.)

Is this behavior still exhibited if no Explorer windows are open to the appropriate directory?

OTHER TIPS

It sounds like something is still hanging on to a reference to the file. Is it possilbe that you have shadow copy set up and it is trying to archive the file?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top