13545876873 当前离线
上等兵
评分人数
aloha20200628 当前离线
少校
type *.txt>"按文件名字符升序合并.txt"复制代码
TOP
Kacastic 当前离线
列兵
type *.txt >>0合并.txt复制代码
qixiaobin0715 当前离线
大校
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复制代码
hfxiang 当前离线
上尉
gawk "FILENAME==\"out.txt\"{next}FNR==1{print FILENAME}1" *.txt>out.txt复制代码
@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复制代码
@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 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复制代码