I want to compare a single character with double quotes " in a in windows batch file.
@echo off
setlocal EnableDelayedExpansion
set var=before
for /f %%a in (zen.csv) do (
set var=%%a
echo !var:~-1!
IF "!var:~-1!"=="""" (
@echo found
)
)
pause
the result is like:
0
1
"
"
"
0
1
2
As you can see, the batch did not output the "found". How to compare a character with double quotes?