{"id":1382,"date":"2018-11-17T07:17:08","date_gmt":"2018-11-17T14:17:08","guid":{"rendered":"http:\/\/jaredrobinson.com\/blog\/?p=1382"},"modified":"2018-11-17T07:17:08","modified_gmt":"2018-11-17T14:17:08","slug":"organize-photos-with-exiftool","status":"publish","type":"post","link":"https:\/\/jaredrobinson.com\/blog\/organize-photos-with-exiftool\/","title":{"rendered":"organize photos with exiftool"},"content":{"rendered":"\n\n<p>I organize images in a custom hierarchy of directories. Lately, I&#8217;ve been using Google Photos and its shared albums to share photos with family. When I download the photos from the album that others have contributed, I want to organize those photos based on <em>who<\/em> contributed them. Google photos doesn&#8217;t make that easy.<\/p>\n\n\n\n\n\n<p>Fortunately, cameras embed their make and model into each picture that they take, and since nearly everyone uses a different model of smartphone or camera, it is easy to separate out the images.<\/p>\n\n\n\n\n\n<p>Windows Explorer allows me to add the model of the camera for an image in the details view. Then I can sort on the model, and break out the photos into a separate subdirectory for each contributor.<\/p>\n\n\n\n\n\n<p>On Linux, I haven&#8217;t found an easy way to do the same thing &#8212; i.e. Gnome&#8217;s file manager, Nautilus, is anemic in comparison, as are other Linux alternatives.<\/p>\n\n\n\n\n\n<p>Recently, I found <a href=\"https:\/\/www.sno.phy.queensu.ca\/~phil\/exiftool\/\">exiftool<\/a>, and it solves the problem for me, at a command-line level (it works on Windows, MacOS, Linux, BSD, and others).<\/p>\n\n\n\n\n\n<p>Test adding the model of camera to image (e.g. Canon EOS Rebel XIV)<br><br><\/p>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>exiftool -p -v1 '-testname&lt;$model %f.%e' *.jpg<\/code><\/pre>\n\n\n\n\n\n<p>Do it for real:<\/p>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>exiftool -p -v1 '-filename&lt;$model %f.%e' *.jpg<\/code><\/pre>\n\n\n\n\n\n<p>The final task is to remove the model name from the image. E.g.<\/p>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>rename 's\/Canon EOS Rebel XIV \/\/' *.jpg<\/code><\/pre>\n\n\n\n\n\n<p>Exiftool can do so much more, including organize images into subdirectories. This examples organizes images in the current directory into year-month-date directories:<\/p>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>exiftool -preserve -d \"%Y-%m-%d\" \"-directory&lt;filemodifydate\" \"-directory&lt;createdate\" \"-directory&lt;datetimeoriginal\" .\n<\/code><\/pre>\n\n\n","protected":false},"excerpt":{"rendered":"<p>I organize images in a custom hierarchy of directories. Lately, I&#8217;ve been using Google Photos and its shared albums to share photos with family. When I download the photos from the album that others have contributed, I want to organize those photos based on who contributed them. Google photos doesn&#8217;t make that easy. Fortunately, cameras &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/jaredrobinson.com\/blog\/organize-photos-with-exiftool\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;organize photos with exiftool&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,30],"tags":[],"class_list":["post-1382","post","type-post","status-publish","format-standard","hentry","category-tech","category-tools"],"_links":{"self":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/1382","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/comments?post=1382"}],"version-history":[{"count":1,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/1382\/revisions"}],"predecessor-version":[{"id":1383,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/1382\/revisions\/1383"}],"wp:attachment":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/media?parent=1382"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/categories?post=1382"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/tags?post=1382"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}