Created
November 25, 2024 14:40
-
-
Save gusteivos/3aa2c6931eaccef64534dfc062f39534 to your computer and use it in GitHub Desktop.
rm.bat again
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 | |
SET v=0 | |
:begin | |
if "%1" == "-f" goto :begin-end | |
if "%1" == "-v" ( | |
SET v=1 | |
goto :begin-end | |
) | |
if "%1" == "" goto :end | |
SET "f=%1" | |
SET "f=%f:/=\%" | |
if exist "%f%" ( | |
del "%f%" | |
if "%v%"=="1" echo removed: '%1' | |
) | |
:begin-end | |
shift | |
goto :begin | |
:end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment