@echo off ::新建文件夹,用于存放修改后的文件 md NewFolder setlocal enabledelayedexpansion for %%i in (*.txt) do ( set n=0 (for /f "delims=" %%a in (%%i) do ( set /a n+=1 if !n! equ 8 ( set str=%%a set "str=!str:"=!" if "!str!"=="%%a" echo,%%a ) else echo,%%a ))>NewFolder\%%i ) pause