Bug in the "Copy" Action of Hazel?

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Bug in the "Copy" Action of Hazel? Sat Dec 07, 2024 10:35 pm • by Trickyt57
My top folder is:
Books

It's sub-folders are:
Book1
Book2
Book3
etc.

Book1 has sub-folders
Chapter 1,
Chapter 2
Chapter 3
etc.

My Hazel instruction is for the folder Books and reads as follows:

"Copy all Books to San-Disk drive".
If "all" of the following conditions are met:
"Any File"
Do the following to the matched file of folder:
"Copy" to folder "San-Disk"
the Options read as follows
If file exists: "do not copy the file"
"Do not copy if a duplicate"
Copy folder structure: "from monitored folder"

The first time I run the the rule, the entire folder and file structure gets copied over correctly.

However, if I now add a new chapter "Chapter 25" to Book1, and run the rule again, Chapter 25 is not copied. Same thing, if I change the name of a file e.g. from "Chapter 1" to "Chapter 1 - version 2". The new name isn't copied.

The message in the log is "Book1 is a dupe of file at destination and is not being copied"

I have tried using "Sync" instead of "Copy". That works as expected. However the trouble with "Sync" is that if I remove a file from the source, then that file is also removed from the destination, which is not a behaviour I want.
Trickyt57
 
Posts: 60
Joined: Tue Sep 18, 2018 12:17 am

Re: Bug in the "Copy" Action of Hazel? Mon Dec 09, 2024 9:43 am • by Mr_Noodle
Having a condition of "any file" will just cause the rule to match once and that's it. It won't trigger for any changes to anything inside the folder.

See the manual for the sync action. You don't have to use the Sync action itself but the conditions in that rule will help guide you towards having a rule match whenever something is modified.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Bug in the "Copy" Action of Hazel? Tue Dec 10, 2024 1:20 am • by Trickyt57
Mr_Noodle wrote:Having a condition of "any file" will just cause the rule to match once and that's it. It won't trigger for any changes to anything inside the folder.

See the manual for the sync action. You don't have to use the Sync action itself but the conditions in that rule will help guide you towards having a rule match whenever something is modified.


Thank you for your reply and guiding me to the Hazel User Guide. I noted the following:
"Hazel ignores what goes on inside subfolders, unless you expressly tell it to examine them. To solve this problem, Hazel offers a special action: “Run rules on folder contents.” "

I've tried now for four hours to tweak the parameters to achieve what I want with no success, trying the above with both synch and copy. I can't make it work the way i want. Simply put, I want the "Copy" function to work on files only (not folders - because that may delete files i want to keep in the destination). I have tried lots of iterations. The best i can achieve is for source and destination to mirror each other.

Maybe I should just repeat what I want to achieve in case you can see how it could be done:

My objective: (Assume a folder structure with hundreds of folders and sub-folders)
Source: New file ==> Destination: New File
Source: File is modified. ==> Destination: File is modified
Source: File is re-named ==> Destination: Renamed file added as new file (previous name NOT deleted)
Source: File is deleted ==> Destination: File is NOT deleted
Destination: file is deleted == Source: file is NOT deleted
Trickyt57
 
Posts: 60
Joined: Tue Sep 18, 2018 12:17 am

Re: Bug in the "Copy" Action of Hazel? Tue Dec 10, 2024 10:43 am • by Mr_Noodle
What do your rules look like now?
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support