@ECHO OFF
:loop
IF NOT "%1"=="" (
IF "%1"=="-file" (
SET filename=%2
SHIFT
)
IF "%1"=="-folder" (
SET foldername=%2
SHIFT
)
IF "%1"=="-r" (
IF EXIST "%2" (
del "%2"
)
SHIFT
)
SHIFT
GOTO :loop
)
IF NOT "%filename%"=="" (
ECHO "">%filename%
)
ECHO %foldername%
The syntax of the command is incorrect.