本帖最后由 pcl_test 于 2015-6-2 00:01 编辑
先下载第三方工具http://batch-cn.qiniudn.com/tool/md5.exe, 用以获取文件hash值来判断文件的重复与否- @echo off
- setlocal enabledelayedexpansion
- for %%a in (*.jpg) do (
- for /f "tokens=1*" %%b in ('md5 "%%a"') do (
- if not defined #%%b# (set "#%%b#=[%%c],") else (set "#%%b#=!#%%b#![%%c],")
- )
- )
- (for /f "tokens=1,2* delims==," %%i in ('set #') do (
- set "str=%%j,%%k"
- set "t=%%k"
- if defined t echo;!str:~,-1! 同
- ))>"重复图片列表.txt"
- pause
复制代码
|