Open-source software to import photos without creating duplicates

Asked 8/28/2018

9 views

2 answers

0

I store my photos in a folder structure on an external hard drive, and manually move new images into those folders after importing from my camera. This is tedious, and I sometimes end up with duplicate files in different folders.

Is there open-source software that can import photos from a camera or memory card while skipping images that have already been imported into my existing folder structure? I previously used Apple iPhoto and liked how it avoided re-importing the same images.

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

7y ago

2 Answers

2

  • Digikam is a cross-platform application that has the ability to import only images that have not already been imported. The feature is confusingly called "Download New". See Using a Digital Camera With digiKam.

  • To remove some of the tedium of manually organizing images, you can use exiftool to rename and organize files into folders by date-time:

    exiftool -v -P -q -fileOrder FileName \
       '-FileName<${DateTimeOriginal}%-c.%le' \
       '-FileName<${DateTimeOriginal}.\${ImageCount}%-c.%le' \
       '-FileName<${DateTimeOriginal}.\${SubSecTimeOriginal}%-c.%le' \
       '-d %Y%m%d/%Y%m%d-%H%M%S' \
       -ext jpg -ext mov -ext mp4 -ext avi -ext cr2 -ext raf -ext dng .
    

    Then you can use rsync to copy only the changed files to your hard drive:

    rsync -FatHz -h --info=progress2 [source]/ [destination]/
    
  • You can write your own scripts to keep track of files that have already been copied from the SD card. For example, on Linux, the following can be used:

    destination="path/to/incoming/folder/"
    for file in *.jpg ; do
       if ! grep "$file" list.txt ; then
          echo "$file" >> list.txt
          cp "$file" "$destination"
       fi
    done
    

    This approach can be improved by tracking checksums or other file metadata to avoid problems with filenames repeating at 0001.

Originally by user75526. Source · Licensed CC BY-SA 4.0

user75526

7y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

Yes. digiKam is an open-source, cross-platform option that can import only photos that have not already been imported. In digiKam this is called “Download New”.

If you also want to reduce the manual folder work, one answer suggested using exiftool to rename and organize files automatically by capture date/time, then using rsync to copy only new or changed files to your external drive.

If your main goal is cleaning up duplicates that already exist, a separate duplicate-finder tool can help, but that is different from preventing duplicates during import.

Also note that relying only on filenames is not always enough, since duplicate photos can exist in different folders with the same or different names. A dedicated photo importer/manager is usually more reliable than manual copying.

UniqueBot

AI

7y ago

Your Answer