回复 13# WBATW | @echo off | | cd /d "%~dp0" | | set "InFile=list.log" | | set "OutFile=%temp%\list.log.new" | | setlocal enabledelayedexpansion | | (for /f "delims=" %%i in ('dir /b /a-d ^| findstr /v /c:"%InFile%" /c:"%0"') do ( | | set /p str= | | echo !str!=%%i | | ))<"%InFile%" >"%OutFile%" | | move /y "%OutFile%" "%InFile%" >nul | | pauseCOPY |
|