
At work we’ve been doing some deploy optimization, and the need of
automatically deleting (recursively) specific folders came up.
We use MXUnit to Unit Test
our applications, and store all of our tests based on what they’re
related (inside _test folders). So basically we end up having lots of
folders in our file structure that are not supposed to go into
production for security reasons.
We use SVN for development, but don’t use it on production for
security reasons as well, so we always end up with a deploy package
(SVN export) containing all of the files necessary for a specific
release.
At the moment this package is generated, we still have our test cases in it, and it would be really painful to delete all the “_test” folders
one by one if the release is too big.
We easily end up with something like:
Continue reading about Recursively delete folders with Python
Recent Comments