Simple file renaming questions

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

Moderators: Mr_Noodle, Moderators

Simple file renaming questions Fri Apr 19, 2013 7:53 pm • by DaMacGuy
I'm trying to clean up the name of downloaded folders...
example "foldername (2013) (otherstuff)"

My rule is trying to remove everything from the first "(" through to the end of the name
Code: Select all
If all of the following conditions are met for the file or folder being matched
     kind is Folder
     Full name matches •Name ('letters & digits token'
          Where •Name is (anything numbers)
Do the following
     Rename with pattern •Name


But it doesn't seem to identify the folder to run the rule on it. :(
DaMacGuy
 
Posts: 14
Joined: Wed Jan 11, 2012 4:16 pm

Re: Simple file renaming questions Mon Apr 22, 2013 4:04 pm • by Mr_Noodle
That pattern doesn't seem to match. In particular, it doesn't account for the end parentheses. If you don't care about anything after the opening paren, try something like "•name (..." where ... is the anything token.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Simple file renaming questions Thu Apr 25, 2013 12:22 am • by DaMacGuy
Yeah, that was kinda' obvious. Guess I was overthinking it.

Changed, and it does make more sense. But still not working. The preview shows that the only rule being applied to a test folder is the Folder content rule, which I'll confess always trips me up.

My folder content rule works though...

Code: Select all
If all of the following conditions are met for the file or folder being matched
      Name is not tags
      Kind is Folder
Do the following to the matched files or folder:
      Run rules on folder contents


My rename rule looks like this now...
Code: Select all
If all of the following conditions are met for the file or folder being matched
     kind is Folder
     Full name matches •Name (...
          Where •Name is (anything)
Do the following
     Rename with pattern •Name
DaMacGuy
 
Posts: 14
Joined: Wed Jan 11, 2012 4:16 pm

Re: Simple file renaming questions Thu Apr 25, 2013 11:28 am • by Mr_Noodle
Both rules match against folders. I'm guessing it's matching the first rule and not the second. You should look into re-ordering the rules in this case.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Simple file renaming questions Thu Apr 25, 2013 7:44 pm • by DaMacGuy
And that was the trick. Sigh. Its the obvious stuff sometimes. :D

Thanks!
DaMacGuy
 
Posts: 14
Joined: Wed Jan 11, 2012 4:16 pm


Return to Open Discussion

cron