gater 当前离线
列兵
评分人数
TOP
yiwuyun 当前离线
四级士官
if ($true){}# == ($true){}# goto ___yiwuyun <# :___yiwuyun @echo off&setlocal&cls (echo $strPath="%~dp0"&type "%~f0")|powershell -command - pause exit/b 0 #> gc -path ($strPath+"*.txt")|sort -unique <#end#>复制代码
DAIC 当前离线
中将
pcl_test 当前离线
荣誉版主
慕夜蓝化 当前离线
@echo off setlocal enabledelayedexpansion (for %%i in (*.txt) do ( for /f "usebackq delims=" %%a in ("%%i") do ( if not defined %%a set "%%a=."&echo,%%a ) )) >$ move /y $ result.txt >nul pause 复制代码
@echo off setlocal enabledelayedexpansion (for %%i in (*.txt) do ( for /f "usebackq delims=" %%a in ("%%i") do ( echo,%%a ) )) >%temp%\$ for /f "delims=" %%i in (%temp%\$) do ( call :find "%%i" ) pause :find find "%~1" "$1" >nul 2>nul||echo,%~1>>$1.txt&&goto :eof goto :eof复制代码
CrLf 当前离线
论坛巡查
@echo off (for /f "delims=" %%a in ('type *.txt' 2^>nul) do ( if not defined %%b ( set %%b=1 echo,%%b ) ))>合并.txt复制代码
@echo off (for /f "delims=" %%a in ('dir /b /a-d *.txt') do ( for /f "delims=" %%b in ('type "%%a"') do ( if not defined %%b ( set %%b=1 echo,%%b ) ) ))>合并.txt复制代码
@echo off for /f "delims=" %%a in ('dir /a-d /b /on *.txt') do ( for /f "delims=" %%b in ('type "%%a"') do ( if not defined %%b set %%b=Def & >>$ echo,%%b ) ) move $ "合并.txt" pause复制代码