We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6be0ae3 commit 3a2d1feCopy full SHA for 3a2d1fe
win32/rm.bat
@@ -1,18 +1,15 @@
1
@echo off
2
+setlocal
3
+set recursive=
4
:optloop
5
if "%1" == "-f" shift
6
if "%1" == "-r" (shift & set "recursive=1" & goto :optloop)
-if "%recursive%" == "1" goto :recursive
7
:begin
8
if "%1" == "" goto :end
9
set p=%1
-if exist "%p:/=\%" for %%I in ("%p:/=\%") do @del "%%I"
10
+if exist "%p:/=\%" for %%I in ("%p:/=\%") do (
11
+ del /q "%%I" || if "%recursive%" == "1" rd /s /q "%%I"
12
+) 2> nul
13
shift
14
goto :begin
-:recursive
-if "%1" == "" goto :end
-set p=%1
15
-if exist "%p:/=\%" rd /s /q "%p:/=\%"
16
-shift
17
-goto :recursive
18
:end
0 commit comments