Delete Directory action failing

Sporadically (maybe 1 out of 3 times?) I'm having problems with the Delete Directory task failing with the error:

Unable to Delete Directory : C:\BuildTemp

System Error.  Code:145

The directory is not empty

I have all the options checked - delete sub directories, delete read-only directories, delete hidden directories.

If I restart the build from the failed operation, the delete always succeeds the second time.

This is on WinSvr 2003 R2 SP2 x64, with FB5.5.0.340

 

Hi Carl,

It sounds like something else might be accessing the directory at the time you’re trying to delete it. The usual suspects are antivirus tools, and indexing tools like Google Desktop.

As a “quick n dirty” fix, each action has a “retry count” you can set with a pause value between tries. This can be accessed on the Runtime tab for the action. Set the retry count to 4 or 5 and FinalBuilder will try multiple times before failing out.

Regards,

Angus

I bet you're right.  I've got Windows Desktop Search running, and I'm sure it's got that pesky indexing service running, "helping me" by indexing all my temporary source files.

I'll give the retry option a try, thanks!

I hit this problem all the time. It’s a major pain in the arse, but it doesn’t seem to be FinalBuilder’s fault. The “retry” method mentioned usually works…

In many cases, what you actually really want is to clean out the directory rather than to delete it, so also see if you can replace the “delete directory” with “delete files”, which stands a better chance of working.

Failing that, there is “unlocker” - google it.

Steve