You can give a try with this code for testing :
@echo off
Title Replace Double Quotes into a Variable
Setlocal EnableDelayedExpansion
set Var1=C:\Users\magoo\"flower.jpg"
echo Variable Var1 with quotes !Var1!
pause
:::::::::::::::::::::::::::::::::::::::::
Call :Dequote !Var1! NewVar1
echo New Variable NewVar1 without quotes !NewVar1!
pause
:::::::::::::::::::::::::::::::::::::::::
set Var2=C:\Users\magoo\"flower2.jpg"
echo Variable Var2 with quotes !Var2!
pause
:::::::::::::::::::::::::::::::::::::::::
Call :Dequote !Var2! NewVar2
echo New Variable NewVar2 without quotes !NewVar2!
:::::::::::::::::::::::::::::::::::::::::
pause
Exit
::::::::::::Function DeQuote:::::::::::::
:Dequote <Var> <NewVar to Set>
set MyString=%1
set StrToFind="
set NewStr=
set %2=!MyString:%StrToFind%=%NewStr%!
Exit /b
:::::::::::::::::::::::::::::::::::::::::
Edit : In your case you can try something like that :
@echo off
Title Replace Double Quotes into a Variable
Setlocal EnableDelayedExpansion
(
FOR /f "delims=, tokens=1-5" %%a IN ('Type input.csv') DO (
Set "MyVar1=%%a"
Rem We dequote the variable MyVar1 and we set it to a new on NewVar1
Call :Dequote !MyVar1! NewVar1
echo !NewVar1!,%%b,%%c,%%d,%%e
)
)>output.csv
Pause & Exit
::::::::::::Function DeQuote:::::::::::::
:Dequote <OldVar> <NewVar to Set>
set MyString=%1
set StrToFind="
set NewStr=
set %2=!MyString:%StrToFind%=%NewStr%!
Exit /b
:::::::::::::::::::::::::::::::::::::::::