| The tidy resource currently doesn't allow removal of non-empty directories. But sometimes this is exactly what is needed. For example we have a Windows application which doesn't cleanup after itself and leaves behind lots of directories with name "out-*" which I would like to remove after some days. Unfortunately, those directories are written to the root of drive D:, alongside other directories, which ought to be kept (but shouldn't need to be traversed). So the approach I'd like to use is:
tidy { 'cleanup_d': |
path => 'D:/', |
matches => ['out-*'], |
age => '7d', |
recurse => 1, |
rmdirs => true, |
} |
but this apparently doesn't work because the directories aren't empty. Please add a "force" property to allow removal of non-empty directories. |