Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Recursively remove directories of the same name from a hierarchy. Useful for PaxHeaders.
@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
You can’t perform that action at this time.