Last active
March 2, 2017 23:10
-
-
Save MarkTiedemann/34950b0907c7568b7f0849079abbb9fd to your computer and use it in GitHub Desktop.
Remove files and directories via batch script
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 | |
:: delete all upgrade logs | |
:: >nul 2>&1 = drop stdout and stderr output | |
DEL UpgradeLog*.htm >nul 2>&1 | |
:: loop over all backup directories | |
FOR /d %%G IN (Backup*) DO ( | |
:: /s = remove all sub directories, too | |
:: /q = remove quietly, without confirmation | |
RMDIR /s /q %%G >nul 2>&1 | |
) >nul 2>&1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment