Page 1 of 1

Copy into monitored folder with rename not working?

PostPosted: Thu Jan 20, 2022 7:39 am
by chrillek
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?

Re: Copy into monitored folder with rename not working?

PostPosted: Thu Jan 20, 2022 11:54 am
by Mr_Noodle
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?

Re: Copy into monitored folder with rename not working?

PostPosted: Thu Jan 20, 2022 1:22 pm
by chrillek
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?

Re: Copy into monitored folder with rename not working?

PostPosted: Fri Jan 21, 2022 10:39 am
by Mr_Noodle
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.

Re: Copy into monitored folder with rename not working?

PostPosted: Fri Jan 28, 2022 2:07 am
by Trickyt57
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.