用bat批处理,去掉TXT里重复的内容 复制如下代码在新建TXT文档中,保存TXT文档,重新命名为a.bat @echo off set /p name=请输入文件名: echo 处理文件:%name%.txt cd.>%temp%\bat.txt for /f "delims=" %%i in (%name%.txt) do (if not defined %%i set %%i=A&echo %%i>>%temp%\bat.txt) del %name%.txt copy %temp%\bat.txt %name%.txt >nul del %temp%\bat.txt start "" %name%.txt echo 已完成 pause |