Re: rake task ) fileutils how to remove parent specific folder

Jordon Bedwell
Tue, 20 Nov 2012 11:18:44 -0000

On Tue, Nov 20, 2012 at 5:08 AM, Erwin
<yves_dufour-ee4meeAH724@public.gmane.org> wrote:
> I have a fixtures directory structure
>
> fixtures
>   en
>     alpha
>     beta
>     delta
>   es
>     alpha
>     beta
>     delta
>
__SNIP__

> is there a way to remove all folders with name ''alpha''
in ALL locales
> folder, and get a resulting structure

FileUtils.rm_rf(Dir[Rails.root.join("spec/fixtures",
"**/alpha")],
secure: true, force: true)