@
san2710 - sorry I misunderstood, I thought you wanted to write the metadata from the database into the pdf.
I am still unsure of your question. If the files are named as you described e.g. -
Charles Dickens - Bleak House - then in Preferences->Add Books (see attachment) use the pre-defined template -
(?P<author>[^_]+) - (?P<title>.+)
I don't think anything has changed since that thread from three years ago. My understanding is that when a book is added the metadata can either be taken from the file name by using a template, or it be extracted from within the book - but not both.
And once the book is in the library I don't think there's a tool to selectively extract metadata from within the format file and update the database.
I find it easier to 'correct' the metadata after I add the book into calibre, rather pre process the metadata in the ebook file before I add it. I create 'books' from a variety of formats including - pdf, txt, odt, docx, epub, mp3, mp4, flv etc - calibre is the only tool I know that lets me maintain the metadata in a consistent manner irrespective of what format(s) I have for a particular book - that's one its major strengths.
For PDF's you might be able to 'fashion' a solution by using Phil Harvey's exiftool to extract the metadata from the pdf's into a csv, and then use the csv as input to the Import List plugin to update the required columns: here's some relevant links
BR