Page 1 of 1

Replacing an old file in many subfolders with a new one

PostPosted: Thu Dec 19, 2013 8:58 am
by macmac
Hi. I am wanting to write a rule for this and am not having any luck so far. I can't figure out exactly what rule to write.

I have a folder that contains many subfolders, with subfolders in them. In each of the deepest subfolders there is an .rtf file that is old, and I want to replace it with a newly-modified one that I have sitting on my desktop. I want it to be copied into to any of those subfolders folders (which contain a file by this name) so that the old .rtf is replaced by my new .rtf.

How would I do this in Hazel? Thank you!

Re: Replacing an old file in many subfolders with a new one

PostPosted: Thu Dec 19, 2013 2:01 pm
by Mr_Noodle
I think you'll need a script to do the copy since it's a file that's external/unrelated to the file being matched. For digging into subfolders, see the sticky article above.