You want to add covers for books
already in calibre?...
If you are willing to do an end-run around calibre's management routines, simply close calibre and move the JPGs into the ebook folders.
Loop through all folders in the library, extract the author and title from the pathname, and copy the right cover in.
calibre should pick up the change.
I'd try to work out a batch script for you but I typed this on my Kindle.