From c1b506c1296100cdaf831c2f5ffeb2fad8d0c8e3 Mon Sep 17 00:00:00 2001 From: kawaiizenbo <48113593+kawaiizenbo@users.noreply.github.com> Date: Sun, 19 Sep 2021 00:11:08 -0700 Subject: [PATCH] d --- IPASorter/Program.cs | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/IPASorter/Program.cs b/IPASorter/Program.cs index 1062257..71a08de 100644 --- a/IPASorter/Program.cs +++ b/IPASorter/Program.cs @@ -53,6 +53,18 @@ namespace IPASorter foreach (IPAFile i in files) { Console.WriteLine($"checking against {i.path} ({i.md5sum})"); + foreach (IPAFile j in files) + { + //Console.WriteLine($"checking {j.path} ({j.md5sum})"); + if(i.md5sum == j.md5sum && i.path != j.path) + { + Console.WriteLine("sound the alarms! these are the same file!!!!!!"); + files.Remove(j); + File.Delete(j.path); + NewFilesEnumerater(); + return; + } + } } } @@ -89,6 +101,26 @@ namespace IPASorter } } } + + static void NewFilesEnumerater() + { + foreach (IPAFile i in files) + { + Console.WriteLine($"checking against {i.path} ({i.md5sum})"); + foreach (IPAFile j in files) + { + //Console.WriteLine($"checking {j.path} ({j.md5sum})"); + if (i.md5sum == j.md5sum && i.path != j.path) + { + Console.WriteLine("sound the alarms! these are the same file!!!!!!"); + files.Remove(j); + File.Delete(j.path); + NewFilesEnumerater(); + break; + } + } + } + } } }