views:

30

answers:

1

How do i get apache ant to delete a directory no matter what, even if there are locks or usages of the directory on windows.

I am using a continuous integration remote agent on a windows box which fails to delete the build directory and as a result fails the builds which is extremely annoying and is disruptive to the statistics.

There is nothing actively using the directory, and the antivirus is disabled.

I just want to delete the directory no matter what. How can i achieve that on windows with apache ant?

+1  A: 

I think you will need external program to do this. check this one: _http://www.codeguru.com/cpp/w-p/files/fileio/article.php/c1287

here you have comparison of unlocking tools.Check this with command line interface: _http://ccollomb.free.fr/unlocker/

If you know what process is holding your folder you can just call taskkill...(you can even kill explorer.exe but and you can start it again) and if your folder is shared you can use net delete command

npocmaka