Folder comparison program

  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8211
  • Loc: USA
  • Status: Offline

Post October 20th, 2009, 8:19 pm

I'm seeking a program that would compare the contents of two folders against each other.

Let me try to explain it this way... this is what I'm trying to do.

I have two folders, the folders hold music... on folder has 40 gigs of music and the other folder has 20 gigs of music. Some of the music that one folder has, is already present in another folder. I want these music combined in one folder. Some music are named differently, but still are the same music.

How could I accomplish that without manually going through them and checking them? That would take too long.

Is there such thing? It would be a total life savor.

Sorry, for those run on sentences that might've confused you guys.
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post October 20th, 2009, 8:19 pm

  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post October 20th, 2009, 8:39 pm

If this is a computer you already have PHP installed on for doing that sort of stuff, you can write a small script that does the following.

Creates a "hash" folder.
Creates a "duplicates" folder.

Goes through the destination folder recursively, runs each file through md5_file(), and creates a new file in the "hash" directory named after the hash returned from md5_file.

Goes through the source directory recursively, running each file through md5_file just like before, except this time you'll be checking for the existence of a file named using the hash returned instead of creating the file.

Any time a hash exists for the file in the source folder, move that file to the "duplicates" folder.
Strong with this one, the sudo is.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 23403
  • Loc: Woodbridge VA
  • Status: Offline

Post October 21st, 2009, 5:55 am

Beyond Compare by Scooter Software.

I swear by it. The standard version is only $30 US and worth every penny. Not only compares folders, but files as well, and is a must have webmaster tool in my opinion.
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8211
  • Loc: USA
  • Status: Offline

Post October 21st, 2009, 1:46 pm

Awesome! Thanks for that awesome reply ATNO! I am going to try Beyond Compare :D
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • User avatar
  • Joined: Jul 25, 2005
  • Posts: 2735
  • Loc: Nashville, TN
  • Status: Offline

Post October 22nd, 2009, 5:06 pm

I don't know...joebert's solution appeals to my [url]Tim Allen[/url] side. If the need arose, I think I'd probably have to go with both just for the coding experience. :)
I'd love to change the world, but they won't give me the source code.

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 113 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.