
In my Downloads folder, I am trying to decompress archive files (.zip, .tar, etc) in the Downloads file but keep a copy of the archive file in a subfolder (i.e. ⬇️ Archives). If the archive file happens to be corrupted (e.g. it didn't fully download, it was a bad file to begin with, etc.) an infinite loop happens: the file gets moved to the sub-folder, a copy is made to the parent folder, Hazel tries to unarchive it, but it can't...it detects the copy and then tries to do the process again.
Is there a way to rewrite my rule so that this loop doesn't happen. (Also, why can't hazelworker create a connection to the Notifier?)
Here's a sample of my log output:
- Code: Select all
2024-11-07 15:11:02.532 hazelworker[15486] [File Event] File copied: OneDrive_2024-11-07.zip copied from folder /Users/user/Downloads/⬇️ Archives to folder /Users/user/Downloads.
2024-11-07 15:11:02.533 hazelworker[15486] Could not create connection to Notifier
2024-11-07 15:11:02.601 hazelworker[15486] Error unarchiving file: /Users/user/Downloads/OneDrive_2024-11-07.zip
2024-11-07 15:11:02.602 hazelworker[15486] [Error] Unarchive failed: Failed to unpack archive for /Users/user/Downloads/OneDrive_2024-11-07.zip.
2024-11-07 15:11:02.602 hazelworker[15486] Could not create connection to Notifier
2024-11-07 15:11:10.657 hazelworker[15486] OneDrive_2024-11-07.zip: Rule Archives matched.
2024-11-07 15:11:10.659 hazelworker[15486] [File Event] File moved: OneDrive_2024-11-07-1.zip moved from folder /Users/user/Downloads to folder /Users/user/Downloads/⬇️ Archives.
2024-11-07 15:11:10.660 hazelworker[15486] Could not create connection to Notifier
2024-11-07 15:11:10.661 hazelworker[15486] [File Event] File copied: OneDrive_2024-11-07-1.zip copied from folder /Users/user/Downloads/⬇️ Archives to folder /Users/user/Downloads.
2024-11-07 15:11:10.662 hazelworker[15486] Could not create connection to Notifier
2024-11-07 15:11:10.689 hazelworker[15486] Error unarchiving file: /Users/user/Downloads/OneDrive_2024-11-07-1.zip
2024-11-07 15:11:10.689 hazelworker[15486] [Error] Unarchive failed: Failed to unpack archive for /Users/user/Downloads/OneDrive_2024-11-07-1.zip.
2024-11-07 15:11:10.690 hazelworker[15486] Could not create connection to Notifier
2024-11-07 15:11:18.739 hazelworker[15486] OneDrive_2024-11-07-1.zip: Rule Archives matched.
2024-11-07 15:11:18.741 hazelworker[15486] [File Event] File moved: OneDrive_2024-11-07-1-1.zip moved from folder /Users/user/Downloads to folder /Users/user/Downloads/⬇️ Archives.
2024-11-07 15:11:18.741 hazelworker[15486] Could not create connection to Notifier
2024-11-07 15:11:18.744 hazelworker[15486] [File Event] File copied: OneDrive_2024-11-07-1-1.zip copied from folder /Users/user/Downloads/⬇️ Archives to folder /Users/user/Downloads.
2024-11-07 15:11:18.744 hazelworker[15486] Could not create connection to Notifier
2024-11-07 15:11:18.767 hazelworker[15486] Error unarchiving file: /Users/user/Downloads/OneDrive_2024-11-07-1-1.zip
2024-11-07 15:11:18.767 hazelworker[15486] [Error] Unarchive failed: Failed to unpack archive for /Users/user/Downloads/OneDrive_2024-11-07-1-1.zip.
2024-11-07 15:11:18.768 hazelworker[15486] Could not create connection to Notifier
2024-11-07 15:11:26.801 hazelworker[15486] OneDrive_2024-11-07-1-1.zip: Rule Archives matched.
2024-11-07 15:11:26.802 hazelworker[15486] [File Event] File moved: OneDrive_2024-11-07-1-1-1.zip moved from folder /Users/user/Downloads to folder /Users/user/Downloads/⬇️ Archives.
2024-11-07 15:11:26.802 hazelworker[15486] Could not create connection to Notifier
2024-11-07 15:11:26.804 hazelworker[15486] [File Event] File copied: OneDrive_2024-11-07-1-1-1.zip copied from folder /Users/user/Downloads/⬇️ Archives to folder /Users/user/Downloads.
2024-11-07 15:11:26.804 hazelworker[15486] Could not create connection to Notifier
2024-11-07 15:11:26.827 hazelworker[15486] Error unarchiving file: /Users/user/Downloads/OneDrive_2024-11-07-1-1-1.zip
2024-11-07 15:11:26.828 hazelworker[15486] [Error] Unarchive failed: Failed to unpack archive for /Users/user/Downloads/OneDrive_2024-11-07-1-1-1.zip.