Page 1 of 1

Counter token - “Always increment” setting

PostPosted: Sat Jun 08, 2024 7:24 pm
by polo214
after create a hazel rule using counter token with "always increment" setting, the counter number# will increase by 1 every time a new matched item is recognized and renamed...is there a way to reset the counter when editing the rule? it seems that currently the "increment" value is bonded with the rule but not the counter itself.

for example, the created rule monitor a folder for a monthly journal, and rename it to "Journal-%Y-issue-#(counter token)" when pattern matched, it is June now, so the latest match would be "Journal-2024-issue-06", since the rule was created in May, so the initial counter value should be set to 5? more importantly, if the initial value was not set correctly, how to reset the counter properly? or you have to recreate the rule?

Re: Counter token - “Always increment” setting

PostPosted: Mon Jun 10, 2024 9:05 am
by Mr_Noodle
Only way to reset the counter currently is via the commandline. See this post: viewtopic.php?f=4&t=710&p=2772&hilit=DirectoryCounter#p2772

Re: Counter token - “Always increment” setting

PostPosted: Mon Jun 10, 2024 9:36 pm
by polo214
Thank you for the reference, it helps.

in my use case, i.e. rename journal collection by volume/number than month-date, it would be easier to have an option in "Adjust Number..." for Counter token, such as "Reset to ", or simpler and more friendly, the # (counter token) is defined separately from rule or folder, but for counter itself, since there are more than a couple of journals being monitoring in the same folder, some weekly and some monthly, so the renaming rules are different from each other, thus # is not always the same.

Re: Counter token - “Always increment” setting

PostPosted: Tue Jun 11, 2024 9:02 am
by Mr_Noodle
The counter is set on a folder-by-folder basis so resetting it in the rule interface wouldn't make sense in this case.