Page 1 of 1

Can Hazel Automatically Archive a File When a New Version Ar

PostPosted: Thu Aug 20, 2026 3:36 am
by Richard03
Hi everyone,

I have a folder where I regularly receive updated versions of the same documents.

My problem is that I want Hazel to recognize when a newer version arrives, move the previous version into an archive folder, and leave the newest file in place.

Has anyone built a Hazel rule for this? I’d like to keep the version history without having to manually move and rename every old file.

Any advice would be appreciated. Thanks!

Re: Can Hazel Automatically Archive a File When a New Versio

PostPosted: Thu Aug 20, 2026 9:05 am
by Mr_Noodle
You can move the file into the folder and have it renumber it instead of replace it. From there, it gets a bit tricky. First off, look up match patterns in the manual.

You can then try something like:
Code: Select all
If (all) are met
    Name matches (• base file name)-(number)
    If (any) are met for (files in the same folder)
        Name matches (• base file name)
Do
    Move to archive folder


That will move the original file if there's another file with a number appended to it.

Now you need to rename the new file:
Code: Select all
If (all) are met
    Name matches (• base file name)-(number)
    If (none) are met for (files in the same folder)
        Name matches (• base file name)
Do
   Rename (• base file name)


That rename the numbered file is there but not the original.

You'll have to play around with it but that's the gist of it.

Re: Can Hazel Automatically Archive a File When a New Versio

PostPosted: Fri Aug 21, 2026 11:08 pm
by Richard03
Okay. Thank you.