use File::Path; rmtree(['foo/bar/baz', 'blurfl/quux'], 1, 1);