Hello:
Thanks for you reply, but I have find that when the string is found, it
will quit the batch!
Source file:
"1","324","2345","234532"
"2","324","2345","234532"
"3","324","2345","234532"
"4","324"," ","234532"
"5","324","2345","234532"
"6","324","2345","234532"
"7","324","2345","234532"
"8","324","2345","234532"
"9","324","2345","234532"
"10","324","2345","234532"
Batch:
@echo off
setlocal
if exist out.txt del out.txt
for /f "Tokens=*" %%a in ('type t.txt') do (
set line=%%a
call

arse
pause
)
endlocal
exit /b 0

arse
set work=%line:," ",=,"0",%
if "%line%" EQU "%work%" echo %line%>>"out.txt"&goto :EOF
echo %work%>>out.txt
expect output file:
"1","324","2345","234532"
"2","324","2345","234532"
"3","324","2345","234532"
"4","324","0","234532"
"5","324","2345","234532"
"6","324","2345","234532"
"7","324","2345","234532"
"8","324","2345","234532"
"9","324","2345","234532"
"10","324","2345","234532"