本帖最后由 qixiaobin0715 于 2022-2-8 08:09 编辑
- @echo off
- md abc
- for %%a in (*.txt) do (
- setlocal enabledelayedexpansion
- (for /f "delims=" %%i in ('type "%%a"') do (
- set /a n+=1
- set /a m=n%%4
- if !m! equ 0 (
- echo,%%i
- echo,今天天气好晴朗
- ) else (
- echo,%%i
- )
- ))>"abc\%%a"
- endlocal
- )
- pause
复制代码
|