Manual reset for # renaming

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

Moderator: Mr_Noodle

Manual reset for # renaming Fri Jan 29, 2010 10:20 am • by doughgik
Is there a way to set the number provided by the "#" attribute back to 1? After testing the rule, it wants to continue with the last used number (in my case 07, following 6 tests). Also, creating a new rule just makes it start the sequence last used, so whole new rules on the system all sequentially use the same sequence pool? They are entirely different names. I mean except using the "#" attribute.

I have tried several things:
- creating a new rule
- restarting the Hazel service in the pref pane
- creating more than one rule using "#"
- deleting the rule and re-creating it
- moving the rule to a different trigger / monitor folder

Is there a way to manually reset this sequence for "#" attribute?
doughgik
 
Posts: 3
Joined: Fri Jan 29, 2010 10:04 am

Re: Manual reset for # renaming Fri Jan 29, 2010 10:53 am • by Mr_Noodle
The "#" is based off of the folder so regardless of how many rules use it, if they refer to files in the same folder, they will share the same counter. If you want a separate sequence, then you can do the renaming in a different folder then move it to the final spot. I say give that a shot and report back.
Mr_Noodle
Site Admin
 
Posts: 11193
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Manual reset for # renaming Fri Jan 29, 2010 4:43 pm • by doughgik
This workaround worked! Thank you!

I just have the base folder rule to move the file to this one sequence folder and a new rule for that one sequence folder to rename the file. It works fine for this need.

It might be worthwhile to have some method of manually resetting that sequence number for folders though. I'm guessing the only current way would be to uninstall, remove all artifacts and reinstall Hazel, which I'm not likely to go through because of this workaround.
doughgik
 
Posts: 3
Joined: Fri Jan 29, 2010 10:04 am

Re: Manual reset for # renaming Mon Feb 01, 2010 1:23 pm • by Mr_Noodle
For the counters, there is a way to "reset" them via the commandline. It's not something I recommend for most people. You should understand what the commands below do and not just copy and paste them.

You can print out the current counter value by doing:

xattr -p com.noodlesoft.Hazel.DirectoryCounter <path to file>

You can set the value by doing:

xattr -w com.noodlesoft.Hazel.DirectoryCounter <some number> <path to file>

And you can remove it (therefore resetting it) by doing:

xattr -d com.noodlesoft.Hazel.DirectoryCounter <path to file>
Mr_Noodle
Site Admin
 
Posts: 11193
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Manual reset for # renaming Mon Feb 01, 2010 3:54 pm • by doughgik
Oh this is even better! I'll probably use the "set" function more than reset (deleting it). Just set it to 1 or 0. Done.

Thank you for this approach!

I take it the path to file is the folder [path] the rule is attached?
doughgik
 
Posts: 3
Joined: Fri Jan 29, 2010 10:04 am

Re: Manual reset for # renaming Tue Feb 02, 2010 12:53 pm • by Mr_Noodle
The folder in question is the folder where the file happens to be when it is renamed. Also, in Terminal, you can drag the folder into the window and it will insert the full path wherever the cursor is.
Mr_Noodle
Site Admin
 
Posts: 11193
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support

cron