# Checking for Non-Duplicate Files

**URL:** <https://boards.straightdope.com/t/checking-for-non-duplicate-files/569444>\
**Category:** In My Humble Opinion\
**Created:** [January 29, 2011, 9:01pm UTC](https://boards.straightdope.com/t/checking-for-non-duplicate-files/569444 "2011-01-29T21:01:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![The\_Evil\_Prince\_Zorte](https://avatars.discourse-cdn.com/v4/letter/t/e95f7d/32.png) [@The\_Evil\_Prince\_Zorte](https://boards.straightdope.com/u/The_Evil_Prince_Zorte)\
**Post date:** [January 29, 2011, 9:01pm UTC](https://boards.straightdope.com/t/checking-for-non-duplicate-files/569444/1 "2011-01-29T21:01:40Z")

</div>

I’m looking for some advice on how to approach this-

I have my photo collection on a server at home, and my laptop. The server is pretty disorganized, with folders according to the date the camera was offloaded. I’ve reorganized everything on my laptop by year and event, and want to wipe out the collection on the server and copy over the collection from my laptop to start fresh with the new folder structure.

Before I clear the server I need to make sure that everything in there is also on my laptop. For instance there may be some photos my wife has copied over from her phone that I don’t have.

How do I compare the pictures folder on my laptop to the pictures folder on the server and find out what files are missing from my laptop, despite them having different subfolder structures?

The server is running Windows Home Server, and the laptop is running Win7 but can boot into OSX (it’s a Macbook). I use Windows Live Photo Gallery, and everything on my laptop has also been uploaded to a Flickr account with a set for each year.

---

<div class="post-metadata">

**Author:** ![iamnotbatman](https://avatars.discourse-cdn.com/v4/letter/i/858c86/32.png) [@iamnotbatman](https://boards.straightdope.com/u/iamnotbatman)\
**Post date:** [January 29, 2011, 9:47pm UTC](https://boards.straightdope.com/t/checking-for-non-duplicate-files/569444/2 "2011-01-29T21:47:33Z")

</div>

Sound pretty difficult if the files don’t have corresponding file names. You’d have to go try to look inside some example files and compare them between the server and laptop and see if you can find any markings that would unambiguously tell you if two photos are the same. For example, on your OSX you can go into terminal, and take a look at the insides of two pictures that you know are the same with the commands:

strings picture\_A.filetype \> output\_A.txt  
strings picture\_B.filetype \> output\_B.txt  
comm output\_A.txt output\_B.txt

This will show you if there are any markings in the two photos that betray that they are really the same photo. If that’s a success, then hopefully you know bash/python programming or something in order to proceed to write a script that goes through every photo on your laptop and compares it to every photo on your server. Yeah, it does sound annoying.

---

<div class="post-metadata">

**Author:** ![The\_Evil\_Prince\_Zorte](https://avatars.discourse-cdn.com/v4/letter/t/e95f7d/32.png) [@The\_Evil\_Prince\_Zorte](https://boards.straightdope.com/u/The_Evil_Prince_Zorte)\
**Post date:** [January 29, 2011, 9:54pm UTC](https://boards.straightdope.com/t/checking-for-non-duplicate-files/569444/3 "2011-01-29T21:54:50Z")

</div>

I don’t know enough about programming to write my own script, but with photos there is at least metadata. You could ID duplicate photos by the date/time they were taken. The date taken is often also the same as Date Modified. I’m wondering if there is an existing utility or script that might be able to do something like this without my simply eyeballing lists of files.

---

<div class="post-metadata">

**Author:** ![iamnotbatman](https://avatars.discourse-cdn.com/v4/letter/i/858c86/32.png) [@iamnotbatman](https://boards.straightdope.com/u/iamnotbatman)\
**Post date:** [January 29, 2011, 10:03pm UTC](https://boards.straightdope.com/t/checking-for-non-duplicate-files/569444/4 "2011-01-29T22:03:37Z")

</div>

Have you verified that the timestamp is indeed the same on a few of the examples of pairs of identical picture files?
