Page 1 of 1

error: "Could not remove original file"

PostPosted: Sun Feb 08, 2026 2:04 pm
by KreatorOfStuff
Hazel 5.2.2
Mac was recently updated to Sequoia, and Dropbox is now a cloud-based folder. The Hazel routine to "archive a zipped copy of a special folder" in the cloud is now broken.

Unfortunately I have no idea when that Dropbox folder change happened, as I didn't do the OS upgrade nor looked at the Mac in a while. But it all went south immediately after the upgrade, so I think the OS change triggered the issue. The result, an hourly back up routine meant to retain only one hour of data filled up the dropbox space very quickly with 120 hours worth :shock:.

The new error "Could not remove original file", is at step 3
The set up is:
1 Backup script drops a folder into Dropbox folder
2 Hazel zips that folder
3 Then moves that folder to trash
4 and empties the trash

Normal behavior was:
Hazel detects the occurrence of a new folder dropping into the Dropbox, zips it, and moves the folder to trash.
A different Hazel script delete all but the newest zip in the Dropbox folder.
A Hazel setting keeps the trash emptied on the computer.

For the following, I copied the text from the screenshot and used the "oops" icon to represent the error (rule does not match)
Step three text:
If all of the following conditions are met
Date Last Modified is not in the last 3 minutes
If all of the following conditions are met for the current file or folder :oops:
Date Last Modified is not among the 2 most recent :oops:
Size is greater than 5 KB
Do the following to the matched file or folder:
Move a to folder: Trash

So there are two major changes that may have caused the failure.
Operating system change.
Dropbox is now a cloud folder.

Obviously I could try an upgrade Hazel, but I'm not sure that's the problem.

The fact that the error is related to the Dropbox folders makes me wonder if there is an issue with the change in structure of Dropbox. It could be as simple as it does not see the DB's modification timestamp so never deletes.

Idea for a work around
Maybe Hazel can note that a folder exists, and wait for 10 more minutes before deleting, giving the other Hazel step time to make the zip.

Re: error: "Could not remove original file"

PostPosted: Mon Feb 09, 2026 11:26 am
by Mr_Noodle
If the icons indicate not matching, then you need to look at the date modified. I'm guessing there are more files that have been modified than the ones you think so those files aren't matching.

Re: error: "Could not remove original file"

PostPosted: Tue Feb 10, 2026 11:53 am
by KreatorOfStuff
Mr_Noodle wrote:If the icons indicate not matching, then you need to look at the date modified. I'm guessing there are more files that have been modified than the ones you think so those files aren't matching.


So you're saying the script could be confused because there are more items in the folder than expected? That is certainly the state it was in when I discovered it it died. When I got the alert that the dropbox account was full, it was because all the folders from each hourly backup was still in the folder.
Even after cleaning out and starting fresh it's still doing it. It was working fine for many years so the big change is dropbox/Sequoia.