I like to name my ebook files in the following way: {LOC Classification} {Year} ({Author Last Name}) {Title}.{extension}
This is a python script that currently extracts Library of Congress info for ebooks in pdf format, and outputs rename commands for them according to the format above. It doesn't automatically rename the files, because I wanted to check the filenames before renaming them. You can copy/paste this into a batch file or script, check to see that the new names are to your liking, and run the batch file/script.
Right now the main problem is that it only outputs the name of the first author.