Copy into monitored folder with rename not working?

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

Moderator: Mr_Noodle

Using Hazel 5.1.1 on macOS 12.1
For testing, I'd like to create a copy of a file and then work with this copy. So I use the action "Copy to folder: monitored folder" and set the option "if file exists" to "Rename file". That should (I think) create a copy of "file" as "file-1" in the monitored folder (which I then subsequently can rename).

However, I always get the error message
Code: Select all
Copy failed: Could not copy file: /Users/ck/Documents/Hazel/Test-Ordner/Bildschirmfoto 2022-01-19 um 20.44.48.png. Source and destination are the same`


Is that expected behaviour? If so, is there another method to create a copy of a file in the same folder?
chrillek
 
Posts: 5
Joined: Wed May 13, 2020 4:44 am

Yes, that is by design. Are you intending to create a copy of a file in the same folder and just leave it there? Would creating an alias suffice in this case?
Mr_Noodle
Site Admin
 
Posts: 11174
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:Yes, that is by design. Are you intending to create a copy of a file in the same folder and just leave it there? Would creating an alias suffice in this case?


Yes, an alias would probably be sufficient. I'll try that out.

As to the process: I have a file "a" that I want to rename using a Hazel rule. While testing, it would be easier if I could make a copy of "a" in the same folder (let's say "a-1") and work on that so that I do not have to recreate "a" whenever the rule ran.
But what is this "rename file if exists" option for anyway if it does not rename?
chrillek
 
Posts: 5
Joined: Wed May 13, 2020 4:44 am

It does but it also has options like replace, which would have to be special-cased since remove the "old" file and then doing the copy would not work.
Mr_Noodle
Site Admin
 
Posts: 11174
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

I always found complications with the "Copy" command. Have you tried using "Sync" istead? It works much better for me, although I didn't have exactly the same case as you.
Trickyt57
 
Posts: 55
Joined: Tue Sep 18, 2018 12:17 am


Return to Support