Created
December 12, 2011 15:08
-
-
Save rasmuskl/1467722 to your computer and use it in GitHub Desktop.
Batch: Clean svn non-versioned and ignored files
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 | |
| echo Cleaning non-versioned and ignored files... | |
| FOR /f "usebackq tokens=2*" %%f IN (`svn status --no-ignore ^| findstr /B [?I]`) DO IF [%%g] == [] (rd /q /s "%%f" 2>nul) ELSE (rd /q /s "%%f %%g" 2>nul) | |
| FOR /f "usebackq tokens=2*" %%f IN (`svn status --no-ignore ^| findstr /B [?I]`) DO IF [%%g] == [] (del /q /f /s "%%f" 2>nul) ELSE (rd /q /f /s "%%f %%g" 2>nul) | |
| echo Done. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment