Created
September 5, 2015 18:33
-
-
Save NobleUplift/8c9e3b524284ac766b63 to your computer and use it in GitHub Desktop.
Recursively remove directories of the same name from a hierarchy. Useful for PaxHeaders.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
SET DIRECTORY=%1 | |
REM PaxHeaders.12345 | |
SET REMOVE=%2 | |
FOR /R %DIRECTORY% %%F IN (.) DO ( | |
IF EXIST %%F\NUL ( | |
RMDIR /S /Q %%F\%REMOVE% | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment