Created
January 19, 2018 13:43
-
-
Save nkrh/a742ae6f96856b3395d712f3bee3acea to your computer and use it in GitHub Desktop.
Delete a directory with Robocopy
This file contains 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 TARGET_DIR=%1 | |
SET EMPTY_DIR=$EMPTY_DIR$ | |
MKDIR %EMPTY_DIR% | |
ROBOCOPY %EMPTY_DIR% %TARGET_DIR% /PURGE | |
RMDIR %EMPTY_DIR% | |
RMDIR %TARGET_DIR% | |
ECHO Directory successfully removed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment