slt_81104 当前离线
列兵
for %%i in (*.txt) do (type "%%i"&echo,)>"%%~ni.temp" copy *.temp result.txt del /a /q *.temp复制代码
DAIC 当前离线
中将
@echo off (for %%i in (*.txt) do ( type "%%i" echo =====真好===== ))>a.temp move /y a.temp a.txt复制代码
TOP
@echo off (for %%i in (*.txt) do ( type "%%i" echo, echo =====真好===== ))>a.temp move /y a.temp a.txt复制代码
@echo off setlocal enabledelayedexpansion set "a=enter.txt" for /f "delims=" %%i in ('dir /b *.txt') do ( set a=!a!+tenter.txt+"%%i" ) echo !a! copy !a! ..\a.txt pause复制代码
@echo off >a.temp type nul for %%i in (*.txt) do ( echo 正在处理文件:%%i >>a.temp type "%%i" >>a.temp echo, >>a.temp echo =====真好===== ) move /y a.temp a.txt复制代码