View Single Post
Old 12-28-2010, 03:47 PM   #1
ejjenkins
Junior Member
ejjenkins began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2010
Device: Kindle 3G-Wifi
RegEx - filename metadata help

I have read through most of the threads for Calibre and regular expressions, I am at a loss.

I have a lot of books that are all saved in the exact same format and I want to be able to extract the metadata from the filenames. Here are a couple of examples:

Adams, Robert,Castaways In Time,01,Castaways in Time.txt
Anderson, Kevin J.,Game Earth,01,Game Earth.txt

All of them are: Author Last Name, First Name, Series Name, Series Index, and Title

If there is no series or series index, the comma will still be there, for example:

Aldiss, Brian W.,,,The Dark Light Years.txt
Anderson, Poul,,,Brainwave.txt

I know this is probably pretty easy and straightforward, but I can't seem to get my brain around this.

And as long as I am asking for the world, is there some way when Calibre sends the file to my kindle it will add the series name and index to the title so that is shows, for example:

Castaways in Time - 01 - Castaways in Time
Castaways in Time - 02 - The Seven Magical Jewels of Ireland

Any help would be appreciated.

Thank you.

Last edited by ejjenkins; 12-28-2010 at 04:00 PM.
ejjenkins is offline   Reply With Quote