本帖最后由 qixiaobin0715 于 2021-12-13 11:12 编辑
- @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
复制代码
|