Trying to create rule to move all but oldest in a folder

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

Moderator: Mr_Noodle

Consider this structure:
Code: Select all
Project1
  Exports
    Version3
    Version2
    old
      Version1
Project2
  Exports
    Version11
    Version10
    Version9
    old
      Version8
      Version7
      Version6


I want a rule that will move all but the newest version of a file within an "Exports" folder to the "old" subfolder of that particular Exports folder. I.e., keep only the most recent version and move the rest into "old".

(Assume that each Version file with a higher number in name also has a more recent creation date.)

I.e., after processing it should look like this:

Code: Select all
Project1
  Exports
    Version3
    old
      Version2
      Version1
Project2
  Exports
    Version11
    old
      Version10
      Version9
      Version8
      Version7
      Version6


I thought I could use the "is not among the" (most recent) but that is not working.

I read the explanation about nesting "among" rules but that doesn't seem to apply. I think it's looking at ALL files in ALL exports folders.

Is this possible with Hazel?
dzg
 
Posts: 25
Joined: Tue Jun 26, 2012 10:19 pm

Do you have a subfolders rule? If not, then you need to add that to get Hazel to get to the export folders in the first place. Also, try using the rule status feature as that will give you a better sense of how rules are matching.
Mr_Noodle
Site Admin
 
Posts: 11868
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:Do you have a subfolders rule? If not, then you need to add that to get Hazel to get to the export folders in the first place. Also, try using the rule status feature as that will give you a better sense of how rules are matching.


Yes I have a subfolders rule ... the scanner is seeing the files in question ... but the 'among the most recent' check is not working as I would expect.
dzg
 
Posts: 25
Joined: Tue Jun 26, 2012 10:19 pm

This is what I've got:

Image

But it's moving ALL the items in '3_Exports' into 'old'
dzg
 
Posts: 25
Joined: Tue Jun 26, 2012 10:19 pm

Got your email and am looking into it though I'm running into other issues I need to tackle before I can diagnose this properly.
Mr_Noodle
Site Admin
 
Posts: 11868
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support