File: remove.bat

package info (click to toggle)
lazpaint 7.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 56,000 kB
  • sloc: pascal: 277,538; python: 2,494; makefile: 233; sh: 221
file content (14 lines) | stat: -rw-r--r-- 235 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
@echo off
if "%~1" == "" goto argument
setlocal
set FILENAME=%~1
set FILENAME=%FILENAME:/=\%
if exist "%FILENAME%" del /f /q "%FILENAME%"
exit /b 0

:argument
echo Removes a file if it exists.
echo Usage: remove [FILENAME]
exit /b 1