{"id":30,"date":"2007-11-13T11:03:14","date_gmt":"2007-11-13T10:03:14","guid":{"rendered":"http:\/\/www.nooblet.org\/blog\/2007\/exifsort\/"},"modified":"2013-01-10T03:46:27","modified_gmt":"2013-01-10T03:46:27","slug":"exifsort","status":"publish","type":"post","link":"https:\/\/www.nooblet.org\/blog\/2007\/exifsort\/","title":{"rendered":"exifsort.pl &#8211; Sort digital images by EXIF date."},"content":{"rendered":"<p>I use 2 digital cameras, and my phone, to take pictures nearly every day. I came accross a <a href=\"http:\/\/blog.gnist.org\/article.php?story=exifdatesort\">perl script written by Lars Strand<\/a>. This copied photos from CAM0001.JPG to a date formatted file such as 20070113.0900.JPG.<\/p>\n<p>I decided to take this as a base, and change it into something that suited my own needs.<\/p>\n<p>The script will take directories on the command-line and copy any pictures found to a target directory set within the script. It then creates a file and directory structure based on the EXIF time\/date found in the JPEG.<\/p>\n<p>For example<\/p>\n<blockquote><p><code>\/source\/CAM0001.JPG<\/code><\/p><\/blockquote>\n<p>now becomes<\/p>\n<blockquote><p><code>\/target\/2007\/11.nov\/20070113.0900.jpg<\/code><\/p><\/blockquote>\n<p>making the files easy to find and splitting them into months.<\/p>\n<p>The script produces an output such as,<\/p>\n<blockquote><p><code>ExifSort v1.0 - http:\/\/www.nooblet.org\/exifsort\/<\/p>\n<p> o Processing folder, \/mnt\/storage\/Photos\/100DSCIM\/<br \/>\n o Processing folder, \/mnt\/storage\/Photos\/100CASIO\/<br \/>\n    CIMG0553.JPG -&gt; 20071111_145714.jpg<br \/>\n    CIMG0554.JPG -&gt; 20071111_153500.jpg<br \/>\n    CIMG0555.JPG -&gt; 20071111_153529.jpg<br \/>\n    CIMG0556.JPG -&gt; 20071111_153614.jpg<br \/>\n    CIMG0557.JPG -&gt; 20071111_155707.jpg<br \/>\n    CIMG0564.JPG -&gt; 20071111_181839.jpg<br \/>\n    CIMG0567.JPG -&gt; 20071111_182038.jpg<br \/>\n    CIMG0569.JPG -&gt; 20071111_182659.jpg<br \/>\n    CIMG0574.JPG -&gt; 20071111_215006.jpg<br \/>\n    CIMG0575.JPG -&gt; 20071112_120508.jpg<br \/>\n    CIMG0580.JPG -&gt; 20071112_120723.jpg<br \/>\n    CIMG0582.JPG -&gt; 20071112_182803.jpg<br \/>\n o Processing complete.<br \/>\n    12 files copied.<br \/>\n     - 101 files the same.<br \/>\n<\/code><\/p><\/blockquote>\n<p>The script checks modified dates and file sizes, and will compare the md5 checksum if it still isn&#8217;t sure, to know if it has already copied an existing file.<\/p>\n<p>The <a href=\"http:\/\/www.nooblet.org\/album\/main.php?cmd=album&#038;var1=photos\/\">photos folder<\/a> in my family photo gallery is a direct result of this exif sorting script.<\/p>\n<p>Requirements:<\/p>\n<ul>\n<li>jhead &#8211; <a href=\"http:\/\/www.sentex.net\/~mwandel\/jhead\/\">http:\/\/www.sentex.net\/~mwandel\/jhead\/<\/a><\/li>\n<li>Perl Digest::MD5 &#8211; Available at <a href=\"http:\/\/search.cpan.org\/perldoc?Digest%3A%3AMD5\">CPAN<\/a><\/li>\n<\/ul>\n<p><b>Download<\/b><br \/>\n<div class=\"wp-downloadmanager\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"wp-downloadmanager-sprite\" aria-hidden=\"true\" focusable=\"false\"><symbol id=\"wp-downloadmanager-icon-file\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M6 2.5h7l5 5v14H6z\" \/><path d=\"M13 2.5v5h5\" \/><\/symbol><symbol id=\"wp-downloadmanager-icon-archive\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M6 2.5h7l5 5v14H6z\" \/><path d=\"M13 2.5v5h5\" \/><path d=\"M11 3h2v2h-2zM11 6h2v2h-2zM11 9h2v2h-2zM10.5 13h3v3.5h-3z\" \/><\/symbol><symbol id=\"wp-downloadmanager-icon-audio\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M6 2.5h7l5 5v14H6z\" \/><path d=\"M13 2.5v5h5\" \/><path d=\"M10 18.5v-5l5-1.5v5\" \/><circle cx=\"9\" cy=\"18.5\" r=\"1.4\" \/><circle cx=\"14\" cy=\"17\" r=\"1.4\" \/><\/symbol><symbol id=\"wp-downloadmanager-icon-code\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M6 2.5h7l5 5v14H6z\" \/><path d=\"M13 2.5v5h5\" \/><path d=\"M10.5 12.5 8 15.5l2.5 3M13.5 12.5 16 15.5l-2.5 3\" \/><\/symbol><symbol id=\"wp-downloadmanager-icon-document\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M6 2.5h7l5 5v14H6z\" \/><path d=\"M13 2.5v5h5\" \/><path d=\"M9 12.5h6M9 15.5h6M9 18.5h4\" \/><\/symbol><symbol id=\"wp-downloadmanager-icon-image\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M6 2.5h7l5 5v14H6z\" \/><path d=\"M13 2.5v5h5\" \/><circle cx=\"10\" cy=\"13.5\" r=\"1.1\" \/><path d=\"M8 19.5l3-3 2 2 3-3.5 2 4.5z\" \/><\/symbol><symbol id=\"wp-downloadmanager-icon-presentation\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M6 2.5h7l5 5v14H6z\" \/><path d=\"M13 2.5v5h5\" \/><path d=\"M9 19.5v-3M12 19.5v-5.5M15 19.5v-8\" \/><\/symbol><symbol id=\"wp-downloadmanager-icon-spreadsheet\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M6 2.5h7l5 5v14H6z\" \/><path d=\"M13 2.5v5h5\" \/><path d=\"M8 12.5h8v7H8zM8 16h8M11.5 12.5v7\" \/><\/symbol><symbol id=\"wp-downloadmanager-icon-video\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M6 2.5h7l5 5v14H6z\" \/><path d=\"M13 2.5v5h5\" \/><path d=\"M10.5 13.5l5 3-5 3z\" \/><\/symbol><symbol id=\"wp-downloadmanager-icon-application\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M6 2.5h7l5 5v14H6z\" \/><path d=\"M13 2.5v5h5\" \/><circle cx=\"12\" cy=\"16.5\" r=\"2\" \/><path d=\"M12 12.5V14M12 19v1.5M8.5 16.5H10M14 16.5h1.5\" \/><\/symbol><\/svg><svg class=\"wp-downloadmanager-icon\" aria-hidden=\"true\" focusable=\"false\"><use href=\"#wp-downloadmanager-icon-file\" \/><\/svg>&nbsp;&nbsp;<strong><a href=\"https:\/\/www.nooblet.org\/blog\/download\/exifsort.pl\">exifsort.pl<\/a><\/strong> (5.2 KiB, 4,357 hits)<br><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I use 2 digital cameras, and my phone, to take pictures nearly every day. I came accross a perl script written by Lars Strand. This copied photos from CAM0001.JPG to a date formatted file such as 20070113.0900.JPG. I decided to take this as a base, and change it into something that suited my own needs. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":648,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[33,48,65,66,76,88,233,104,124,143,159],"class_list":["post-30","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-camera","tag-date","tag-exif","tag-exifsort","tag-gallery","tag-image","tag-linux","tag-md5","tag-perl","tag-script","tag-timestamp"],"_links":{"self":[{"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/posts\/30","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/comments?post=30"}],"version-history":[{"count":3,"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/posts\/30\/revisions"}],"predecessor-version":[{"id":750,"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/posts\/30\/revisions\/750"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/media\/648"}],"wp:attachment":[{"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/media?parent=30"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/categories?post=30"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nooblet.org\/blog\/wp-json\/wp\/v2\/tags?post=30"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}