You can use Calibre to read the metadata from the file name. Then you can use a specific template and "Save to disk". It will then use the format you gave it to save the epub to a folder.
I use the format: author’s last, first - series name series# - title.ePub
There are specific codes that I’ll need to copy from my computer when I get there, but it looks something like this:
“Herbert, Frank - Dune 04 - God Emperor of Dune.epub”
As for Calibre making duplicates, just create a different library for purposes of this metadata exercise.
Edit: if you don’t mind writing a program, and are familiar with python, one of the MR members is
developing a module so you can programmatically acces the epubs. That may be more fun than learning the functions already in Calibre.