It seems that EXIST cannot handle file/foldernames that are enclosed in either single or double quotes. I also seem to have the same problem with MOVE/DEL

code:
break on
cls

$iRC=setoption('WrapAtEOL','ON')

$a='%WINDIR%'
if exist($a)
? 'Found '+$a
else
? 'Unable to find '+$a
endif

$a='"%WINDIR%"'
if exist($a)
? 'Found '+$a
else
? 'Unable to find '+$a
endif

$a="'%WINDIR%'"
if exist($a)
? 'Found '+$a
else
? 'Unable to find '+$a
endif

$a='%ALLUSERSPROFILE%\Start Menu\Programs\Accessories\*.lnk'
if exist($a)
? 'Found '+$a
else
? 'Unable to find '+$a
endif

$a='"%ALLUSERSPROFILE%\Start Menu\Programs\Accessories\*.lnk"'
if exist($a)
? 'Found '+$a
else
? 'Unable to find '+$a
endif

$a="'%ALLUSERSPROFILE%\Start Menu\Programs\Accessories\*.lnk'"
if exist($a)
? 'Found '+$a
else
? 'Unable to find '+$a
endif

_________________________
There are two types of vessels, submarines and targets.