I came across Hazel while looking for ways to improve and automate my photography workflow.
I’m using a Nikon Z9, and the camera uploads my photos via FTP to a folder on an external drive. The files are RAW files (.NEF).
The folder structure currently looks like this: ftp_upload/
This folder is continuously receiving new .NEF files while I’m shooting.
What I would like Hazel to do is monitor this folder and, once it contains a certain number of photos (for example, 1,000 .NEF files), automatically move those files into a newly created batch folder.
For example:
1,000 .NEF files → batch_1
Next 1,000 .NEF files → batch_2
Next 1,000 .NEF files → batch_3
And so on.
Ideally, Hazel would automatically create the batch folder if it doesn’t exist and automatically increment the batch number. I would therefore not have to manually create batch_1, batch_2, batch_3, etc. for every shoot.
The important part is that the batch size should be configurable. I’m starting with 1,000 photos, but I may want to change this later depending on the shoot.
The workflow I’m aiming for is essentially:
Nikon Z9 → FTP → ftp_upload → Hazel → batch_1 → batch_2 → batch_3 → etc.
The reason I want to do this is that I’m working with large numbers of photos during events.
I want the FTP upload folder to remain available for new photos while Hazel handles the batch organization automatically in the background.
Eventually, these batches will be processed further by Imagen AI and then imported into Lightroom Classic, so I’m trying to build this as a fully automated workflow step by step.
I’m mainly looking for advice on the Hazel rules required to:
1. Count the number of .NEF files in ftp_upload
2. Trigger the rule when the configurable limit is reached
3. Automatically create the next batch_x folder
4. Move the corresponding .NEF files into that folder
5. Automatically increment the batch number for the next batch
Is this possible with Hazel alone, or would I need to use a small shell script in combination with Hazel?
Any advice or examples of how you would set this up would be greatly appreciated.
Thanks in advance!