I make a lot of photographs. I do that with several cameras. Actually, there are five digital cameras that I can reach right now, from where I’m sitting at my desk. That’s not really a brag; I have too many cameras. You get the idea, though.
When one has too many cameras for several years, one can quickly find themselves with thousands of photographs, as I do. Not being a photographer by trade, though, I don’t have all that much interest in spending my time culling the lot of them, but efforts to quickly make my picks have also resulted in some unhappy deletions.
Over the years, I’ve been filing away my digital photos on hard drives, grouping them into folders by date. Until recently, that happened by a PowerShell script that would automatically load my photos from memory cards onto my hard drives. Alas, Windows 10 ended its support this month, and my desktop (despite being more than fast enough for everything I’ve asked of it) needed a new board and CPU to support Windows 11.
I went another way with it, and got a Mac.
Shell scripting to move files
My old PowerShell script was… fine. Kind of basic. So, I had fun rewriting it as a bash script for macOS. The script basically takes whatever is on a memory card in the usual places for most cameras, and splits it out into photos, videos and audio files. (The audio part is something I use for my Zoom H2n Handy Recorder, rather than anything I do on my cameras.)
It groups those into a date-based folder hierarchy, and then ejects the drive when it’s done: a necessity, since I never need to do that on my iPad, and then always forget to on my Mac.
At any rate, in hopes that someone finds it useful, I opted to add a few bells and whistles, and a help file, in order to share the script I wrote for this, which can be found on this GitHub repository: colintemple/media_organizer.sh.
And now, I can spend less time fussing with memory cards, and more time making photographs, like this one, from the ByWard Market this week:

Yay.
