3

Does anyone know of a program (or even bash script) that can take photos from various folders and then consolidate them into one place and organise them into a directory structure by date in the way that Shotwell and simliar can if using a GUI?

I have a headless server that I intend to auto sync family phones (all android) photographs to. The idea would be that newly uploaded photos go into a holding directory and then a script runs on cron to import these into the main picture repository.

I'm currently looking to build this around Owncloud but the android app is very basic and just syncs pictures into the root of the Owncloud folder.

I already have an archive of photos that spans about 10 years and is nicely organsied into folder by the various succession of Linux photo management apps that I have used.

I do suspect that a nice bash script would suffice but I'm looking for a decent off the shelf solution first. If I have to write my own bash script then so be it, any tips you have would be appreciated.

  • Take a look at ImageMagick. imagemagick.org – slm Feb 27 '14 at 13:31
  • Forgot to mention it will be video as well these days – edmondscommerce Feb 27 '14 at 14:01
  • Cheers, identify in imagemagick would give me create date on images by the looks of it – edmondscommerce Feb 27 '14 at 14:02
  • If you're a little more specific what you want we might be able to help you flesh out an actual script. – slm Feb 27 '14 at 17:02
  • Photo managers will take a photo and import it to a directory structure in the form of: YYYY/MM/DD/photo.jpg – edmondscommerce Feb 28 '14 at 11:52
4

I believe I have found the answer:

http://www.sno.phy.queensu.ca/~phil/exiftool/filename.html

A nice perl utility called exiftool that I was planning to use for getting exif data across a wide range of media files. Turns out it has a directory sorting system

Something along the lines of this command are the answer: exiftool -r -d %Y/%m/%d/image_%H%M%S.%%e "-filename<filemodifydate" DIR

exiftool home page: http://www.sno.phy.queensu.ca/~phil/exiftool/

0

I would roll my own solution here. I think you're going to be hard pressed to find something off the shelf that does exactly what you want.

I do something along your lines for consolidating all our digital pictures into folders (we have 9+ years), putting 200 images into a folder, because the digital picture frame we use cannot handle everything in one folder.

Using ImageMagick makes working with the images from the command line pretty easy and you have almost every feature at your disposal that you'd get from an actual GUI tool.

  • Yep it looks like I'm going to roll my own solution for this, will post it up once its done. I will try to handle video and picture formats and then have something that puts unrecognised files into a holding directory for manual sorting – edmondscommerce Feb 28 '14 at 11:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.