Quote:
Originally Posted by sircastor
Unless I'm missing something, I would skip trying to get your expression to handle different orders.
|
I use
Bulk Rename Utility (Freeware) and rename the files so they're all consistent which I can then use Calibre to easily handle.
It allows you to rename files using a flexible Match expression, and a flexible Replacement expression so swapping fields is easy. Since all my files are formatted as either
Surname, Firstname - whatever.txt or
Firstname Lastname - whatever.txt you can build off the comma to match the files you want swapped. I use the regex.
Code:
^(\w+)[ ]*,[ ]*([^-]+?)[ ]*-[ ]*(.*)
with Replace set to \2 \1 - \3. so it only selects the files where the author has a comma in it for renaming and leaves the ones already formatted correctly alone to get a consistent naming scheme.
In case that's all just gibberish, here's an visual example:
http://i97.photobucket.com/albums/l2...Authorswap.jpg
From there the expressions in this thread work perfectly to import into Calibre.