ANOTHER Dropbox photo management post

After reading the "My Perfect Photo Management Process using Dropbox & Flicker" I thought I would post my own experience with Dropbox photo management and Hazel.
In 2012, I read Federico Viticci's Moving from iPhoto to Dropbox and immediately liked his ideas. I subscribed to a 100GB Dropbox account, purchased Hazel and began to implement his methods. I encountered problems along the way, had to do a lot of research and learn a LOT about Phil Harvey's Exiftool application. I wanted to share my research and experience both to have a record that I can reference and to maybe try to assist others.
I will admit that many will not like my file naming scheme as it includes "undesirable" characters (spaces, dashes, quotes and especially the slash). I have a decent understanding of quoting and escaping file names in a unix environment so it is my cross to bear.
I like my file names to convey as much info about the file as possible and I virtually copied Federico's entire process with a few tweaks to make it mine.
I know the slash is not recommended but it makes the coordinates much more readable for me personally. The backslash could have been used as well, but I was worried about its "escaping" behavior.
Federico later recommended the Unbound app for IOS for viewing remotely stored photos which I also purchased. I adopted his folder hierarchy as well to make Unbound display content in chronological order. So I have individual folders for each year and within each year there is a folder for each month named as: YYYY - MM - MMMMMMMM.
- Folder example: 2014 - 05 - May
I initially used the Dropbox IOS app "Camera Upload" feature to upload all my photos. After several months, I decided that I did not like the naming scheme that Dropbox uses for newly imported photos. All uploaded photos are named with a date/time naming scheme of: yyyy-mm-dd hh.mm.ss
For example, Dropbox would have named the above example photo as: 2014-05-22 00.11.09.jpg
I find two downsides to this...
In a later post Federico recommended the CameraSync app for uploading to Dropbox. I really liked this
app for its much greater control for when, how and how much is uploaded to Dropbox and began to use it instead of the Dropbox app. One of my most-liked features of CameraSync is the "Use Original Filenames" which uploads all my files as IMG_####.
As mentioned in the article "the Dropbox api is not letting third-party developers set timestamps". As a result of this, all the filesystem creation/modification dates and times of the file are set to the moment that CameraSync uploads the file to dropbox. The actual creation date still exists in exif, but Hazel uses the filesystem timestamps for rules and sorting.
This wreaked havoc with my organization system! Federico's article did show how to paste a php script into Hazel to correct dates and times but since I don't know php and don't want to use code I don't understand, I looked for my own options.
After learning a great deal about exiftool I wrote two scripts to include in my Hazel rules. One is a simple bash script to "touch" each file with the creation date pulled from the exif data. The second is another bash script to rename the file using exiftool instead of Hazel.
As a final organizational note, unlike many posts I found on the internet I actually desire to have both my movies and screenshots incorporated right in to my photo gallery. The movies are for fairly obvious reasons. As far as the screenshots, when attending events I will often take screenshots of the compass or weather apps documenting where I was at the time. I will also take screenshots of internet information pertaining to the event. So I want screenshots in my gallery and can always go back and delete non-relevant shots.
My photo workflow is as follows...

For screenshots, movies and photos, the sequence of the rules is the same

For screenshots, movies and photos, the renaming shell script is identical

The renaming script is a cascade. Phil Harvey explained in his forums that the LAST VALID filename argument is the one used to name the file:
Note the colon between the brackets ([:]). The colon in an exiftool filename translates into a slash (/) in the Mac OS. I found that little tidbit direct from Phil Harvey somewhere deep in the exiftool forums. In a final file name it looks like [/] which indicates to me that exiftool found no GPS info.
The "touch" scripts are slightly different. Screenshots have almost no exif information while photos and movies have a convenient "CreatDate" in exif. For "touch"ing and naming screenshots I use the "FileModifyDate" exif tag.
I created a more simple touch script for screenshots.

Versus a slightly more complex version for movies and photos. I made this one more complex just in case I ever import from a camera that doesn't use a "CreateDate" tag.

The move to the PhotoGallery folder and subsequent sort into subfolder is again the same for screenshots, movies and photos. I discovered the trick of moving to a folder first and then having the sort rule from the Noodlesoft forums. This avoids the manual step of having to create a new year folder and month subfolders for each new year. If there is no "2015" folder in my PhotoGallery when Hazel tries to put a photo there next January, it will automatically be created as well as the "January" subfolder.

The final product looks like this...

It can be easily browsed via Finder on my Macs or with the Unbound app (or any other viewing apps) on my IOS devices in full chronological sequence.
I have not activated or used Dropbox's Carousel app as I am afraid it might try to make changes to something in my system. Comments?
I look forward to comments and criticisms that will help further refine my workflow.
In 2012, I read Federico Viticci's Moving from iPhoto to Dropbox and immediately liked his ideas. I subscribed to a 100GB Dropbox account, purchased Hazel and began to implement his methods. I encountered problems along the way, had to do a lot of research and learn a LOT about Phil Harvey's Exiftool application. I wanted to share my research and experience both to have a record that I can reference and to maybe try to assist others.
I will admit that many will not like my file naming scheme as it includes "undesirable" characters (spaces, dashes, quotes and especially the slash). I have a decent understanding of quoting and escaping file names in a unix environment so it is my cross to bear.
I like my file names to convey as much info about the file as possible and I virtually copied Federico's entire process with a few tweaks to make it mine.
- I name my photos with: yyyy-mmdd-hhmm.ss[lat/lon]"camera model_camera filename".
- I go down to the second to capture photos taken in rapid succession or burst mode.
- I prefer the camera's original filename (usually IMG_####) to again preserve sequence in rapid-fire photos.
- In the future, with scripts I can easily isolate individual pieces of info about photos or groups of photos by using the delimiters in my naming scheme (lat/lon between brackets, filename between quotes, date/time with dashes, dots and a bracket).
I know the slash is not recommended but it makes the coordinates much more readable for me personally. The backslash could have been used as well, but I was worried about its "escaping" behavior.
Federico later recommended the Unbound app for IOS for viewing remotely stored photos which I also purchased. I adopted his folder hierarchy as well to make Unbound display content in chronological order. So I have individual folders for each year and within each year there is a folder for each month named as: YYYY - MM - MMMMMMMM.
- Folder example: 2014 - 05 - May
I initially used the Dropbox IOS app "Camera Upload" feature to upload all my photos. After several months, I decided that I did not like the naming scheme that Dropbox uses for newly imported photos. All uploaded photos are named with a date/time naming scheme of: yyyy-mm-dd hh.mm.ss
For example, Dropbox would have named the above example photo as: 2014-05-22 00.11.09.jpg
I find two downsides to this...
- it works well as long as all of your photos are one second or more apart. With rapid photos or burst mode photos I began to discover sequence problems. It could also be related to when the file finished copying to the Dropbox server. The first file to finish uploading gets the base name then all the subsequent uploads get the -# at the end of the name. I had many burst photos of 3-5 photos out of order after Dropbox upload. I also suspect that Hazel was affecting this because of the order in which it received the files.
- by renaming the files with their scheme Dropbox totally eliminates the camera's original name for the file. It no longer exists even in the exif data. So that opportunity for sequencing photos is gone.
In a later post Federico recommended the CameraSync app for uploading to Dropbox. I really liked this
app for its much greater control for when, how and how much is uploaded to Dropbox and began to use it instead of the Dropbox app. One of my most-liked features of CameraSync is the "Use Original Filenames" which uploads all my files as IMG_####.
As mentioned in the article "the Dropbox api is not letting third-party developers set timestamps". As a result of this, all the filesystem creation/modification dates and times of the file are set to the moment that CameraSync uploads the file to dropbox. The actual creation date still exists in exif, but Hazel uses the filesystem timestamps for rules and sorting.
This wreaked havoc with my organization system! Federico's article did show how to paste a php script into Hazel to correct dates and times but since I don't know php and don't want to use code I don't understand, I looked for my own options.
After learning a great deal about exiftool I wrote two scripts to include in my Hazel rules. One is a simple bash script to "touch" each file with the creation date pulled from the exif data. The second is another bash script to rename the file using exiftool instead of Hazel.
As a final organizational note, unlike many posts I found on the internet I actually desire to have both my movies and screenshots incorporated right in to my photo gallery. The movies are for fairly obvious reasons. As far as the screenshots, when attending events I will often take screenshots of the compass or weather apps documenting where I was at the time. I will also take screenshots of internet information pertaining to the event. So I want screenshots in my gallery and can always go back and delete non-relevant shots.
My photo workflow is as follows...
- Use CameraSync to upload to Dropbox "Camera Uploads" folder
- Hazel watches the "Camera Uploads" folder and applies one of three rule sets based on whether the file is a photo, movie or screenshot.
- Hazel's rules "touch" each file with a "CreateDate" pulled directly from the exif data of the file and then rename the file utilizing the exiftool command rather than Hazel. (this prevents any naming discrepancies that may be caused by upload or Hazel timing).
- Finally, Hazel moves and sorts the file into the file structure of my Photo Gallery.

For screenshots, movies and photos, the sequence of the rules is the same
- shell script to set creation date in filesystem
- set color label for screenshots and movies
- shell script to rename file
- move file to main photos folder
- sort file into proper subfolder

For screenshots, movies and photos, the renaming shell script is identical

- Code: Select all
exiftool -P -d "%Y-%m%d-%H%M.%S" -c "%+.3f" '-FileName<${FileModifyDate}[]"%f%-c".%e' '-FileName<${CreateDate}[:]"%f%-c".%e' '-FileName<${CreateDate}[:]"${Model}_%f%-c".%e' '-FileName<${CreateDate}[${GPSLatitude}:${GPSLongitude}]"${Model}_%f%-c".%e' "$1"
The renaming script is a cascade. Phil Harvey explained in his forums that the LAST VALID filename argument is the one used to name the file:
- Code: Select all
exiftool -P -d "%Y-%m%d-%H%M.%S" -c "%+.3f"
- Code: Select all
'-FileName<${FileModifyDate}[]"%f%-c".%e'
- Code: Select all
'-FileName<${CreateDate}[:]"%f%-c".%e'
- Code: Select all
'-FileName<${CreateDate}[:]"${Model}_%f%-c".%e'
- Code: Select all
'-FileName<${CreateDate}[${GPSLatitude}:${GPSLongitude}]"${Model}_%f%-c".%e'
Note the colon between the brackets ([:]). The colon in an exiftool filename translates into a slash (/) in the Mac OS. I found that little tidbit direct from Phil Harvey somewhere deep in the exiftool forums. In a final file name it looks like [/] which indicates to me that exiftool found no GPS info.
The "touch" scripts are slightly different. Screenshots have almost no exif information while photos and movies have a convenient "CreatDate" in exif. For "touch"ing and naming screenshots I use the "FileModifyDate" exif tag.
I created a more simple touch script for screenshots.

Versus a slightly more complex version for movies and photos. I made this one more complex just in case I ever import from a camera that doesn't use a "CreateDate" tag.

The move to the PhotoGallery folder and subsequent sort into subfolder is again the same for screenshots, movies and photos. I discovered the trick of moving to a folder first and then having the sort rule from the Noodlesoft forums. This avoids the manual step of having to create a new year folder and month subfolders for each new year. If there is no "2015" folder in my PhotoGallery when Hazel tries to put a photo there next January, it will automatically be created as well as the "January" subfolder.

The final product looks like this...

It can be easily browsed via Finder on my Macs or with the Unbound app (or any other viewing apps) on my IOS devices in full chronological sequence.
I have not activated or used Dropbox's Carousel app as I am afraid it might try to make changes to something in my system. Comments?
I look forward to comments and criticisms that will help further refine my workflow.