1

此脚本按文件名查找重复的视频。文件名都是格式化的 Video Title (YEAR#) other info.mkv

@echo off
for /f "delims=" %%v in ('dir /b /a-d') do set "compare=%cd%\%%v" & call :action
exit /b

:action

:: if already moved do next file
if not exist "%compare%" exit /b

:: extrapolate search string by cutting after year tag
setlocal enabledelayedexpansion
for /l %%y in (1900,1,2100) do set "string=!compare:(%%y)=(%%y)&rem !"
endlocal & set string=%string%

:: count similar files within folder 
set "count=0" & set "report="
for /f "delims=" %%v in ('where ".:%string%*" 2^>nul') do set /a "count+=1" && set "report=%string:?= %"

:: what happens for duplicates
if not "%count%"=="0" if not "%count%"=="1" echo duplicates found %report%
if not "%count%"=="0" if not "%count%"=="1" for /f "delims=" %%v in ('where ".:%string%*" 2^>nul') do move "%%v" d:\dupes

它当前设置为移动重复项以进行手动比较和删除。真正能帮助我解决这个问题(手动处理或自动删除)的是知道preset它们是用什么(x265)编解码器编码的。我无法使用mediainfo. 我怎样才能发现马虎的编码?

4

0 回答 0