remove.bat 235 B

1234567891011121314
  1. @echo off
  2. if "%~1" == "" goto argument
  3. setlocal
  4. set FILENAME=%~1
  5. set FILENAME=%FILENAME:/=\%
  6. if exist "%FILENAME%" del /f /q "%FILENAME%"
  7. exit /b 0
  8. :argument
  9. echo Removes a file if it exists.
  10. echo Usage: remove [FILENAME]
  11. exit /b 1