Я сделал программу для вас здесь: https://github.com/ITCMD/Remove-Duplicates
DelDupe /?
выход:
Deletes duplicate Files except the latest edited. DelDupe "Directory" "Filename" /F /C Character Directory: Directory to search for duplicate names. Use C:\Users\IT Command\Documents\Batch Codes\Keep Recent Mod Date for current dir. Filename: Duplicated Filename to search for /F Do not prompt removal /C Provide your own system character: The default character it uses to seperate files is ~. You don't need to know what this means, but if you have the ~ character in your filename then supply your own. Character: The Character you want to use instead of ~ Example: DelDupe "C:\Users\IT Command\Documents\Batch Codes\Keep Recent Mod Date" "Picture.png" This example will surch all subdirectories in your current folder for a file called "Picture.png" and will delete all copies except for the most recently modified one. Created by Lucas Elliott www.itcommand.tech
Обратите внимание, что это не сайт, чтобы попросить людей сделать для вас полные сценарии. Люди злятся, если ты не показываешь, что пробовал (я знаю, ты, наверное, не знаешь, с чего начать). Можно задавать вопрос, как вы, на мой взгляд, но не всегда ожидайте полного ответа. В любом случае, мне просто нужно это для меня.