Skip to content

Instantly share code, notes, and snippets.

@gusteivos
Created November 25, 2024 14:40
Show Gist options
  • Save gusteivos/3aa2c6931eaccef64534dfc062f39534 to your computer and use it in GitHub Desktop.
Save gusteivos/3aa2c6931eaccef64534dfc062f39534 to your computer and use it in GitHub Desktop.
rm.bat again
@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