Page 1 of 1

Automatically create batch folders after every 1,000 RAW fil

PostPosted: Fri Sep 11, 2026 2:46 am
by KristianHoekman
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!

Re: Automatically create batch folders after every 1,000 RAW

PostPosted: Fri Sep 11, 2026 8:49 am
by Mr_Noodle
Will the batch folders be in the same folder? Do you really need it to be in batches or would just moving the individual NEF files as they arrive be sufficient? Is there a naming scheme to the NEF files?

Re: Automatically create batch folders after every 1,000 RAW

PostPosted: Fri Sep 11, 2026 10:46 am
by KristianHoekman
Thanks for replying!

Yes, I do need the batching. Imagen-AI doesn't support automatic uploads.
I have to upload each batch manually, so I group the incoming photos into batches of 1000 to make each manual upload session manageable, rather than processing files one by one as they arrive.

Regarding the folder structure: I'd like to keep the "ftp_upload" folder clean, so the batch folders (batch_1, batch_2, etc.) should be created in a separate parent folder (e.g. "batches"), rather than inside or next to "ftp_upload" itself.
As for naming: yes, the NEF files come straight from the camera with sequential numbers (e.g. DSC_0001.NEF, DSC_0002.NEF, etc.), so there's a consistent incrementing pattern if that's useful for building the rule.

Re: Automatically create batch folders after every 1,000 RAW

PostPosted: Tue Sep 15, 2026 9:03 am
by Mr_Noodle
One way to do it.

If you want to keep the ftp folder near empty, have a rule to move it to another folder for processing.

In that folder, have a rule like the following:
Code: Select all
If (all) are met
    Extension is NEF
Do
    Sort into subfolder batch


That will file any NEF file into a folder named batch. Then have a separate rule as follows:
Code: Select all
If (all) are met
    Name is batch
    Sub-file/folder count is greater than 999
Do
    Move to <some other folder>

That will move the batch folder when it has 1000 or more items in it. Set the options on the move action to rename the folder if it already exists at the destination. This will give you the numbered folders.

The main caveat of this approach is that there might be more than 1000 files in a particular batch. Not sure how strict you need to be with this.