Because of what Kovid said, you need to parse the file names to get the metadata you want. Have a look at the "Adding books" page in the preferences. You need to uncheck the "Read metadata from file contents" option at the top and then set the regular expression further down. Mine preferences has an example that looks to do what you want.
But, I think there is a better way to do this. Firstly, I think the OPF file will be read if it exists with the book. But if the purpose of this is to copy your library from one machine to another, there is a lot of discussion on how to do this.