Automatically create and fill a note with content?

My best guess is somehow defining it to take files with the same name and putting them into a note with the same name. But I am unfamiliar with writing any sort of automation scripts.

The way jDownloader downloads it puts it into a folder with the video name, and then within that folder is the video and md… All named the same thing…

So ideally, I could use some sort of automation that would go by folder. Taking each folder, created a new note (with the same name), and placing the video and md file into that new note. Something like that. I have no idea if its possible.