I have created command script for reading %N%
lines from file
. The problem is I can't delete "
from anywhere in all text streams when I work with file's text. "
deletion is very needed because if file's text line have substring like "text"
and text
have special chars or even worse, script code, then the script crashes or works not proper way (including script control capturing by programmer who specially composed the text
).
If I can't delete "
from the text stream(s), then I just want to identify, that the file
(or it's first %N%
lines, including empty lines) contains at least one "
char.
Any thoughts are appreciated, including any file
preprocessing. But main aim is script speed.
for /f "skip=2 delims=" %%a in ('find /v /n "" "file" 2^>nul') do set "v=%%a"&call :v&if not errorlevel 1 goto FURTHER1
goto FURTHER2
:v
for /f "delims=[]" %%a in ("%v%") do set "line%%a=%v:*]=%"&if %%a lss %N% (exit /b 1) else exit /b 0
I can only identify "
, but not delete. Waiting for your suggestions on it!
>nul 2>&1 findstr /m \" "file"
if not errorlevel 1 echo double quote found!