I do understand the difference between the formats, so no, I am not converting PDF's to EPUBS. I am little by little redownloading all of them (most of them are 100+ year old book not copyrighted anymore)
Thank you for your answers... I played with some files, and I realize it is way too complicated for a script as not all the metadata can be in the filename. I guess I will end up doing it manually over a few weeks.