@echo off
setlocal
if (%1)==() goto end
sort<%1 >tmp.txt
set "a="&(set b=)
type nul>sss.txt
for /f "delims=" %%a in (tmp.txt) do call :hehe "%%a"
del tmp.txt
set "a="&(set b=)
goto :eof
:hehe
set a=%b%
set b=%~1
if not "%a%"=="%b%" echo %b% >>sss.txt
goto :eof
:end
echo 对不起,参数错误!!!
此批处理现只对.TXT文本文件有用,主要是排序和过滤相同行
实在没的可发了,主要是学习而用,有些符号没有做相应过滤
setlocal
if (%1)==() goto end
sort<%1 >tmp.txt
set "a="&(set b=)
type nul>sss.txt
for /f "delims=" %%a in (tmp.txt) do call :hehe "%%a"
del tmp.txt
set "a="&(set b=)
goto :eof
:hehe
set a=%b%
set b=%~1
if not "%a%"=="%b%" echo %b% >>sss.txt
goto :eof
:end
echo 对不起,参数错误!!!
此批处理现只对.TXT文本文件有用,主要是排序和过滤相同行
实在没的可发了,主要是学习而用,有些符号没有做相应过滤
