As you can see, this is not a trivial thing to accomplish. How many notes are you referring to?
About 1,000. Here’s what I’ve discovered: I created a new database, as converting just creates a duplicate of the original in the same folder, which is not what I wanted. I started importing the RTFD files I already had. This was the part that amazed me: Now. as Rich Text notes, I could use the original script (posted above) and it worked! The problem is some of the folders of notes with many items taxes my MacBook Air 2020 M1 more than anything! Not surprised, but it took my largest folder quite a while to go thru the 200+ notes there. Many have imbedded images. I’ll bring the other folders in and run the script against those. Most other folders are small(er) so they should go relatively quickly.
Needless to say, I really appreciate the help you and chrillek provided. If some other poor soul comes along wanting to do same, I hope I can help as you both did for me.