Delete files recursively

Strangely, in the set of actions Delete File(s), Delete Directory, FileSet Delete Files, there doesn’t seem to be an easy way to recursively delete files matching a filemask. In fact, the easiest way appears to be to create a zip directory, using the “recurse directory” and “remove files” options, then delete the zip afterwards. Hmm…:slight_smile:

Steve

I believe this was a deliberate deisgn decision to avoid problems if/when users accidently manage to delete large chunks of work and blame FinalBuilder.

Kithran

correct.

With the risk of stating the obvious, defining a fileset with a recursive include pattern does not what you want to accomplish?

Ah, very interesting. Yes, looks like a recursive fileset would work, thanks. Which kind of makes the design decision moot, but anyway…

Steve

shhhh…

And there goes the cat…

There is an ugly thing to this: In the delete FileSet, you cannot delete readonly flies. In my case I want to clean the Visual Studio webdeploy directory from horrible *scc files. Now I use a DeleteFile(s) and a folder iterator in combination with a DeleteFile(s) action.
I agree in the past it was a risky operation. But I think with the standards of today (separate recoverable build machine), and the excelent variable-insight, or whatever it is called, the changes of making a buisness-breaking error are zero. Please put it in!