Created
September 29, 2014 13:42
-
-
Save digitalfun/62e39818d5d76dcacfcf to your computer and use it in GitHub Desktop.
Lists/Deletes all duplicates in the active directory using command line tool "SwissFileKnife" from Stahlworks.
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 | |
| REM Lists/Deletes all duplicates in the active directory. | |
| REM Uses: sfk.exe | SwissFileKnife | http://stahlworks.com/dev/swiss-file-knife.html | |
| REM Configuration ++++++++++++++++++++ | |
| SET FILE_EXT=txt | |
| SET SEARCH_PATH=. | |
| REM ---------------------------------- | |
| ECHO. | |
| sfk dupfind %SEARCH_PATH% .%FILE_EXT% +del | |
| ECHO. | |
| ECHO. | |
| echo If you want to do delete the files, type "y" and press enter ... | |
| SET /p option= | |
| IF '%option%'=='y' GOTO :delete | |
| EXIT | |
| :delete | |
| sfk dupfind %SEARCH_PATH% .%FILE_EXT% +del -yes | |
| PAUSE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment