Copy and change name

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

Moderator: Mr_Noodle

Copy and change name Sun Sep 18, 2011 3:45 pm • by gordonprice67
I want to monitor one particular file, and when the label is changed to green, copy it with a different name to another folder, overwriting the file that is there.

However, the standard Hazel copy doesn't offer a rename option, so the only approach I am able to come up with is actually multiple rules. The idea being that one watches the original and makes a copy in the same folder. The next watches for that copy to happen and does the rename, and the last looks for the renamed version and moves it to the new folder. However, I can't even get a copy of the same folder to work, so I need to have rules for a whole new folder as well. All of which seems rather kludgy and suggests I am missing something obvious.

So, workflow should be something like this...
File.File in folder A has label set to green.
File.File is copied over File.Template in folder B.
File.File has it's label set back to nothing.

Any suggestions greatly appreciated!
Gordon
gordonprice67
 
Posts: 2
Joined: Sun Sep 18, 2011 3:35 pm

Re: Copy and change name Mon Sep 19, 2011 12:00 pm • by Mr_Noodle
Why can't you do it in one rule? Just have multiple actions. You may want to do the rename first then copy it over as the copy action has the option to overwrite and existing file.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Copy and change name Sun Jun 30, 2024 10:35 am • by misiektoja
Copy with changed name would be useful as I was just looking if it can be done in Hazel ;-) I have a lot of use cases where I monitor some files, if they change I would like to put it into backup folder with specific pattern (for example current timestamp) added to the filename; being able to do it in one rule (copy with changed name, similar to pattern options we have in rename) would be elegant solution. Right now I need to monitor the backup folder and do the rename of copied files there.
misiektoja
 
Posts: 6
Joined: Fri Jun 28, 2024 7:45 pm

Re: Copy and change name Mon Jul 01, 2024 8:53 am • by Mr_Noodle
It would make the UI much more cluttered and confusing since there are already two simpler actions to do what you want. You also do not need to monitor the destination folder. You can copy and then rename in the same rule. The rename applies to the copy.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Copy and change name Mon Jul 01, 2024 11:26 am • by misiektoja
Mr_Noodle wrote:It would make the UI much more cluttered and confusing since there are already two simpler actions to do what you want. You also do not need to monitor the destination folder. You can copy and then rename in the same rule. The rename applies to the copy.


Yes, I know about the rename option in copy rule, but unfortunately it does not allow to define the pattern (for example to have specific timestamp in the filename).
misiektoja
 
Posts: 6
Joined: Fri Jun 28, 2024 7:45 pm


Return to Support