Page 1 of 1

Renaming file name keeps adding a duplicate title

PostPosted: Wed Mar 28, 2018 6:44 am
by geegovah
I want to rename all files in a given folder with the name of that folder. I have set up a rule thus:

If all of the following conditions are met:
Any file
Name does not contain abc-123
Rename with pattern abc-123 name extension.

Despite the "name does not contain" condition Hazel prepends abc-123 to every file in that folder that already contains that name every time a new file is added, and every time I click Run Hazel Rules for that folder.

How do I write the rule to stop that happening i.e. to prepend abc-123 only once?

I should add that I have applied this rule to many folders, and most of them don't iterate in this way. It is the newer ones that do, but all I have ever done is to copy a rule to a new folder and then adapt it to the name of the new folder.

Re: Renaming file name keeps adding a duplicate title

PostPosted: Wed Mar 28, 2018 10:30 am
by Mr_Noodle
Can you go through the troubleshooting guide here? https://www.noodlesoft.com/kb/hazel-tro ... ing-guide/

Report back with the output of each of those steps.

Re: Renaming file name keeps adding a duplicate title

PostPosted: Wed Mar 28, 2018 12:18 pm
by geegovah
Mr_Noodle wrote:Can you go through the troubleshooting guide here? https://www.noodlesoft.com/kb/hazel-tro ... ing-guide/

Report back with the output of each of those steps.


Thank you. The rule is working in that it is renaming the file, it is just that it is renaming and then renaming and then renaming.

In the past I have used the Preview button and predictably I get the green ticks against the condition "Name does not contain abc-123" when it does contain abc-123, which is why it then renames that file, and all the files, when I add a new file to that folder, or click on Run Rules for that folder. The file is not renamed when Hazel processes that folder passively in the background, only when I add a file to the folder or click Run Rules.

Re: Renaming file name keeps adding a duplicate title

PostPosted: Thu Mar 29, 2018 12:18 pm
by Mr_Noodle
Forcing Hazel to run will cause it to run for files that the rules have already run on. That said, it shouldn't match in this case. Can you post/email a screenshot of this matching in preview (along with the pop-up showing what the filename is)?