Renaming file with increment number?

Talk, speculate, discuss, pontificate. As long as it pertains to Hazel.

Moderators: Mr_Noodle, Moderators

Renaming file with increment number? Wed Nov 24, 2021 1:53 pm • by johnkree
Hello.

I'm trying to figure out how to rename a file that is called "weekly plan 12" on a weekly basis with an increment number. 12 reflects the number of school weeks during a school year.
I'd like Hazel to copy the actual file into an archive folder (which I already figured out) and rename the file with weekly plan "number" + 1... how would I do that?

Thank you for any help!

I figured out how this would work... or better: it is working but it is using the wrong number. No matter the settings it counts up. I'd like to start at 11 and it counts to 20 every time I try the rule with a file named "weekly plan".
johnkree
 
Posts: 3
Joined: Mon Nov 08, 2021 12:44 pm

Re: Renaming file with increment number? Fri Nov 26, 2021 11:25 am • by Mr_Noodle
Using the built-in counter will start from 1 and go from there. Does this number correspond to anything on the calendar? How often does it repeat?
Mr_Noodle
Site Admin
 
Posts: 11193
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Renaming file with increment number? Fri Nov 26, 2021 4:49 pm • by johnkree
Mr_Noodle wrote:Using the built-in counter will start from 1 and go from there. Does this number correspond to anything on the calendar? How often does it repeat?


Hello and thank you for your reply. Yes... I'm a teacher and the school year is counted in school weeks which starts on the first school day and lasts till the last day before the next school year. It is similar to calendar weeks but instead of beginning to count in January it starts on the first school day.

Coming week is the 12th school week of this year. The name of the file is "school week 11.numbers". I hoped that Hazel would figure out automatically that 11 is a number. I put the bracket in the name part and under the small arrow I set "increment" to on.
Is there a way to define which part of the name is what? Like telling hazel: school week = name. 11 = number?


Edit: I did it! I was using this tutorial:
https://www.noodlesoft.com/manual/hazel ... n-actions/

Thank you! A fine program you have. I'm loving it.
johnkree
 
Posts: 3
Joined: Mon Nov 08, 2021 12:44 pm

Re: Renaming file with increment number? Mon Nov 29, 2021 12:12 pm • by Mr_Noodle
Note that you can use "Week of the year" when including a date. That, on top of using a date adjustment, you can probably get what you want.
Mr_Noodle
Site Admin
 
Posts: 11193
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Open Discussion