rule to duplicate and rename BOTH files

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

Moderator: Mr_Noodle

rule to duplicate and rename BOTH files Tue Dec 17, 2013 2:14 am • by teacher24_70
I'm trying to create a rule that would duplicate/copy a file, rename the copied file and place it in a folder and then rename the original file and place it in a separate folder.

Right now, my rule is duplicating the file and placing it in a folder, but then renaming this already renamed file (instead of the original).

Do I need to create 2 different rules or can this be incorporated into one with multiple steps. My only concern with it being 2 rules is that doesn't it only process the file once? Meaning once it ran the first rule, it wouldn't then be allowed to run the 2nd rule on the same original file would it?
teacher24_70
 
Posts: 3
Joined: Tue Dec 17, 2013 2:08 am

Re: rule to duplicate and rename BOTH files Tue Dec 17, 2013 2:58 pm • by Mr_Noodle
When you say you want to place the original folder, you mean you want to move it there? Keep in mind any actions after a move/copy operate on the destination, not the source. In this case, you can rework things where you

1. move the file to the first file (instead of copy)
2. rename it
3. copy that file to the place you wanted the original file to go
4. rename it.

Give that a shot.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

I'll try that when I get home.

When I do the 2nd rename, is there a way to remove a portion of the first rename or only add to it?
teacher24_70
 
Posts: 3
Joined: Tue Dec 17, 2013 2:08 am

That seems to have worked. The only thing I'd like to be able to do (but don't think Hazel will allow) is to be able to rename the 2nd version based on the original name, not the 1st version's renaming.

Right now, the 2nd renaming has to add to the 1st renaming instead of just the original file name. I wish there was a way to delete and alter part of a file name when renaming.

For example-
2013-12-18-Cash receipts
renamed as 2013-12-18-Cash receipts-for Quicken (1st move and renaming).
Then it's 2nd renaming has to be 2013-12-18-Cash receipts-for Quicken-Archive (instead of just 2013-12-18-Cash receipts-Archive as I'd like.

I'm not sure if this makes sense or not, but at least the rules are doing the basics of what I want, even though the file name gets rather long by the 2nd renaming.
teacher24_70
 
Posts: 3
Joined: Tue Dec 17, 2013 2:08 am

Re: rule to duplicate and rename BOTH files Thu Dec 19, 2013 1:58 pm • by Mr_Noodle
A bit weird but you can set the original name in the comments and then pull them back out later. Or alternatively, have a condition like "Name matches (•orig name)" such that you can capture the original name into the •orig name token and use it later.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support