diff options
Diffstat (limited to 'tk/win/rmd.bat')
-rw-r--r-- | tk/win/rmd.bat | 48 |
1 files changed, 22 insertions, 26 deletions
diff --git a/tk/win/rmd.bat b/tk/win/rmd.bat index 63bf7619ac5..ee82bb12720 100644 --- a/tk/win/rmd.bat +++ b/tk/win/rmd.bat @@ -1,26 +1,22 @@ -@echo off -rem RCS: @(#) $Id$ - -if not exist %1\tag.txt goto end - -echo Removing directory %1 - -if "%OS%" == "Windows_NT" goto winnt - -cd %1 -if errorlevel 1 goto end -del *.* -cd .. -rmdir %1 -if errorlevel 1 goto end -goto success - -:winnt -rmdir %1 /s /q -if errorlevel 1 goto end - -:success -echo deleted directory %1 - -:end - +@echo off
+rem RCS: @(#) $Id$
+
+if not exist %1\nul goto end
+
+echo Removing directory %1
+
+if "%OS%" == "Windows_NT" goto winnt
+
+deltree /y %1
+if errorlevel 1 goto end
+goto success
+
+:winnt
+rmdir /s /q %1
+if errorlevel 1 goto end
+
+:success
+echo Deleted directory %1
+
+:end
+
|