Created
October 6, 2015 01:49
-
-
Save taverasmisael/6b9bd6b01c4840d812c0 to your computer and use it in GitHub Desktop.
This simple "bat" script will help windows user to delete folders with large path, with "Robocopy" help. For example delete node_modules folder
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 | |
if {%1}=={} @echo Syntax: DelFolder FolderPath&goto :EOF | |
if not exist %1 @echo Syntax: DelFolder FolderPath – %1 NOT found.&goto :EOF | |
setlocal | |
set folder=%1 | |
set MT=”%TEMP%\DelFolder_%RANDOM%” | |
MD %MT% | |
RoboCopy %MT% %folder% /MIR | |
RD /S /Q %MT% | |
RD /S /Q %folder% | |
endlocal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment