a way to allow clobbering somehow in Windows?

Tag: windows Author: ssyherioc Date: 2009-07-12

I would like some kind of delete/copy/move/etc Windows commands that completely ignores if a file is "in use" or not and will do its job anyway.

my specific case:

So at the company I'm working at, we have GUI test scripts. The GUI program we're testing is one that is supposed to protect other "testprograms" (as we call them) by modifying them in certain ways. So, setup/teardown for these tests involve making a copy of the archived, un-tampered testprograms so that the GUI program can perform destructive operations (while the un-tampered copies still exists).

However, numerous times there's been some glitch and some process is still using the copied testprograms, thereby preventing teardown from overwriting the testprogram with another un-tampered one for the next round of testing. Thus, every single test "fails" because teardown fails.

Unfortunately I can not provide any specific code.

Best Answer

use the command-line version of Unlocker

comments:

+1 for unlocker, I have used it many a time to uninstall a pesky little program. Very easy to use.
I've tried 1.9.0 and 1.9.1 and neither works when invoked programmatically (via NAnt <exec>). Any alternatives that work properly?
@Andrew: i've never seen unlocker fail; try uninstall, clean registry, and reinstall, or contact the manufacturer