necnec1 当前离线
二级士官
评分人数
ShadowFiend 当前离线
上等兵
@echo offmd newfolder 2>nulset "crc32sum=%~dp0crc32sum.exe"set "#tmp=%~dp0#tmp" cd /d D:\aa (for /f "delims=" %%i in ('dir /b/a-d') do ( %crc32sum% %%i))>%#tmp% for /f "tokens=1,2" %%i in (%#tmp%) do ( if not defined %%j ( set %%j=flag copy /y "%%i" "%~dp0newfolder" ))del "%#tmp%" /qstart %~dp0newfolderpauseCOPY
TOP
BAT-VBS 当前离线
少将
删除其中一个文件到回收站 千万别彻底删除了 文件我还有用
@echo offfor /f "tokens=1-2" %%a in (a.txt) do ( if not defined _%%a ( set _%%a=1 ) else ( echo 删除%%b ))pauseCOPY
weichenxiehou 当前离线
上尉
@echo off::将下一行的crc32.txt替换为实际的文件名(for /f "tokens=1*" %%a in (crc32.txt) do ( if defined %%a (echo,%%b) else set %%a=1))>a.txtdir /s /b /a-d>b.txtfindstr /i /g:a.txt b.txt>c.txtfor /f "delims=" %%a in (c.txt) do del /a "%%a"del a.txt b.txt c.txtCOPY
@echo offfor /f "tokens=1-2" %%a in (a.txt) do ( if not defined _%%a ( set _%%a=1 ) else ( >>b.txt echo 删除%%b ))pauseCOPY
@echo offfor /f "tokens=1-2" %%a in (a.txt) do ( if not defined _%%a ( set _%%a=1 ) else ( for /f "delims=" %%h in ('dir /s /b /a-d %%b') do ( del /f /a "%%h" ) ))COPY