What format are these books? If they're PDFs and you're attempting to convert to something else, you can enable the header and footer regular expressions during conversion and then write appropriate regular expressions to remove the header and footer.
Note that you have to check the checkbox as well as fill out the regular expression. Too often I find myself writing the perfect regular expression, doing a conversion, looking at the output and wondering why it didn't work when it did during testing. It's always because I forgot to check the checkboxes.