(variable) was unexpected

Solved
qwertyu -  
 qwertyu -
Hello,
I am starting with batch scripting. I am trying to create a program to delete shortcuts (as they are automatically created with each installation).

@echo off
title delete shortcut
echo Remove shortcuts (.lnk)
set /P _verif=OK ? (Y/N)
if /I "%_verif%" NEQ "Y" goto end

for /r %%f in (*.lnk) do (
del %%f
echo %%f deleted
)

:end
pause > nul

It shows me the error:
%f was unexpected. 


I do not understand what is wrong. Thank you in advance for any solutions.
Configuration: Windows / Firefox 63.0

1 réponse

qwertyu
 
I solved it; you only need to put one letter
(%f instead of %fich)
0