removedir.bat 257 B

1234567891011121314
  1. @echo off
  2. if "%~1" == "" goto argument
  3. setlocal
  4. set DIRNAME=%~1
  5. set DIRNAME=%DIRNAME:/=\%
  6. if exist "%DIRNAME%\" rd /s /q "%DIRNAME%"
  7. exit /b 0
  8. :argument
  9. echo Removes a directory and all its content if it exists.
  10. echo Usage: removedir [DIRNAME]
  11. exit /b 1