MTyrealhanla Posted January 28, 2017 Share Posted January 28, 2017 Hi, I am relatively new to the launchbox community. I absolutely love the application. Upon importing my games and downloading metadata from both the launchbox games database and emumovies i noticed that sometimes games would get duplicate box art. These duplicates had the exact same file name, the only different were the extensions (ie. jpg, png). I wrote a very quick and dirty application that will find these duplicates and delete one based on the extension you provide. I made it as safe as possible, so it only finds images with the EXACT same file name, the only difference is the extension. When you launch the console app, you just give it the path of your images directory, and then the extension you would like to delete then hit enter. The app will recursively drill to every folder and perform the deletion. I put the code on GitHub here: https://github.com/mtyrealhanla/DupPicDeleter Use at your own risk obviously, make a backup just in case but it worked beautifully in my case. Quote Link to comment Share on other sites More sharing options...
kmoney Posted January 28, 2017 Share Posted January 28, 2017 @MTyrealhanla Sounds like a great tool to have. Would you mind uploading it to our download section here on the forums? Glad you like LaunchBox and I see this is your first post here so welcome to our forums and community Quote Link to comment Share on other sites More sharing options...
MTyrealhanla Posted January 28, 2017 Author Share Posted January 28, 2017 (edited) @kmoney Sure thing, wasn't sure if it was kosher to put something i just slapped together up there or not Edited January 28, 2017 by MTyrealhanla Quote Link to comment Share on other sites More sharing options...
Rincewind Posted January 28, 2017 Share Posted January 28, 2017 This will be good to have a play with as I know I have a lot of dup images thanks @MTyrealhanla Quote Link to comment Share on other sites More sharing options...
MTyrealhanla Posted January 29, 2017 Author Share Posted January 29, 2017 no problem @Rincewind. I am going to be making some improvements here soon and will update it in the downloads section. 1) a test mode so you can output to the console the files that would be deleted without deleting them 2) optional comparison with checksums to find duplicate files that do not have the same name. Quote Link to comment Share on other sites More sharing options...
Rincewind Posted January 29, 2017 Share Posted January 29, 2017 4 hours ago, MTyrealhanla said: @Rincewind 2) optional comparison with checksums to find duplicate files that do not have the same name. Now that really will be a great feature Quote Link to comment Share on other sites More sharing options...
Norfair Posted January 29, 2017 Share Posted January 29, 2017 I've found a solution for deleting duplicate images (by comparing checksums). Check out my post here: 1 Quote Link to comment Share on other sites More sharing options...
MTyrealhanla Posted January 29, 2017 Author Share Posted January 29, 2017 2 hours ago, Norfair said: I've found a solution for deleting duplicate images (by comparing checksums). Check out my post here: very cool @Norfair. Thanks, ill check that out. I will probably continue down this path also because I want to make it pretty launchbox specific (like how this app will delete images with same name minus extension also, whether or not the checksums match). I also found that sometimes launchbox will have duplicate images, where one of the images is tied to the correct game and one isn't (see image). I'm can't think of a way to ensure an image is actually tied to the correct game, so i may do the checksum enhancement and have it spit out results so the users can check by hand (maybe unless the duplicate image has "ALMOST" the same name... Game-01, Game-02, etc.). Quote Link to comment Share on other sites More sharing options...
Norfair Posted January 29, 2017 Share Posted January 29, 2017 8 minutes ago, MTyrealhanla said: very cool @Norfair. Thanks, ill check that out. I will probably continue down this path also because I want to make it pretty launchbox specific (like how this app will delete images with same name minus extension also, whether or not the checksums match). I also found that sometimes launchbox will have duplicate images, where one of the images is tied to the correct game and one isn't (see image). I'm can't think of a way to ensure an image is actually tied to the correct game, so i may do the checksum enhancement and have it spit out results so the users can check by hand (maybe unless the duplicate image has "ALMOST" the same name... Game-01, Game-02, etc.). One problem with my method is when an image is used for multiple games. As @DOS76 said in the other thread, fanart images can be used for multiple games (maybe other image categories too). A Launchbox specific tool could handle this situation. Quote Link to comment Share on other sites More sharing options...
Rincewind Posted January 29, 2017 Share Posted January 29, 2017 The main thing is that per platform / per game / per image category (say screenshot...) there are no dup images so if it searches as the structure is then it would only delete a dup in that category. I'm no coder so I don't even know if that is possible or if that would stop the images being used for multiple games, I didn't even know they were used on multiple games Quote Link to comment Share on other sites More sharing options...
MTyrealhanla Posted January 29, 2017 Author Share Posted January 29, 2017 Yeah i think once launchbox decides to attach an incorrect image to a game, then it becomes a very difficult problem. One i probably wouldn't want to take any assumptions on. What i can do is make it output those duplicates to the user so you can make a decision. I did have a little time while the kid was napping so i slapped a GUI on the existing version and uploaded it to the downloads section. I also added a test mode so you can see what the app would delete before actually doing it. 1 Quote Link to comment Share on other sites More sharing options...
MTyrealhanla Posted January 30, 2017 Author Share Posted January 30, 2017 I updated the tool in the downloads section with the hash option as well as a few other new features. Think ill take a break from it now Quote Link to comment Share on other sites More sharing options...
Rincewind Posted January 31, 2017 Share Posted January 31, 2017 Thank you @MTyrealhanla Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.