13545876873 当前离线
上等兵
评分人数
fzp070 当前离线
三级士官
TOP
qixiaobin0715 当前离线
大校
@echo off set _out.txt=true (for /f "delims=" %%i in ('dir /b /a-d *.txt') do ( if not defined _%%i ( set /p=%%~ni <nul type "%%i" echo, ) ))>out.txt pause复制代码
aloha20200628 当前在线
上尉
@echo off &(for /f "delims=" %%F in ('dir/b/a-d *.txt') do (set/p="%%~nF "<nul&type "%%F"&findstr /v $ "%%F">nul &&echo,))>"txt.all" 2>nul ren "txt.all" "合并.txt"&pause&exit/b复制代码
@echo off &(for /f "delims=" %%F in ('dir/b/a-d *.txt') do (echo,%%~nF&type "%%F"&findstr /v $ "%%F">nul &&echo,))>"txt.all" 2>nul ren "txt.all" "合并.txt"&pause&exit/b复制代码
hfxiang 当前在线
gawk "FILENAME==\"out.txt\"{next}FNR==1{print FILENAME}1" *.txt>out.txt复制代码
type *.txt>temp ren temp out.txt复制代码
@echo off (for /f "delims=" %%i in ('dir /b /a-d *.txt') do ( echo,%%~ni type "%%i" echo, ))>temp ren temp out.txt pause复制代码