First thing you should do is get all of your ebooks in one place.
Second thing you should do is get some sort of duplicate file finder. Dunno what your OS is but for linux, there is a program called fdupes. Something like that that will scan your files for binary duplicates.
Third thing is to use the scripts at
https://github.com/na--/ebook-tools to get the file names and such of your books ready.
Then import. Do it in stages, all the A's, all the B's, etc.
I don't know anything about windows so it'll be up to you and others to translate.