I added a picture of what I am looking for to the post (Edit/Find). I think FindInFilesRegex corresponds more or less to Use wildcards on this screen.

Also %RCOPY preserves date modified of the original routine, and I'd rather preserve it. So far other listed approaches do not preserve it.

Yes, that works and assigns the time of copy as the date modified. Thanks, Stephen! BTW, in my experience at least some old-fashioned commands are faster than their modern equivalents though in this case the speed is not an issue.

Robert, it does not trigger source control and yes, I'd like it non-interactive too.

Marc, a slight variation on your idea, tested whether targetRtn exists or not. Thanks again!

zn "A"
currRtn=(##class(%Routine).%OpenId(rtnName))
stream=currRtn.Read()
zn "B"
targetRtn=(##class(%Routine).%OpenId(rtnName))
sc=targetRtn.Write(stream)
targetRtn.Save()

That would make the routine from namespace A immediately available in namespace B as is. The goal is to have routines in two namespaces different until the time comes for the programmer to make them the same via an RCOPY analog. It is also a "per routine" job used for synchronizing.

One more question if I may: I try to exclude global subnodes but so far unsuccessfully. Is it possible?
This correctly exports the corresponding node only: items("SOMEGLOBAL(""ABC"",""XYZ"",""USERFORM_ATEST"").GBL") = ""
Now if I try to exclude this node from the SOMEGLOBAL like this, items("SOMEGLOBAL.GBL",'"SOMEGLOBAL(""ABC"",""XYZ"",""USERFORM_ATEST"").GBL") = "", it does not exclude it. There is a barely visible single negating quote in the beginning of the second item.

Robert, thanks a lot! This is what I saw today too in these nodes but not something I saw a few days ago. So I am still perplexed to some extent. I'll try various scenarios later, probably next week and will get back here if anything would be different.