View Single Post
Old 09-04-2013, 03:03 PM   #4
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,475
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by OldLincoln View Post
I've been giving this a solid try and am close but hit a bump. I'm selecting books, go to Edit Metadata in Bulk. I select the following:

Search Field: identifiers
Identifier Type: mobi-asin
Search For: .*
Replace With: .*
Identifier Type: amazon

NOTE: These are all the fields I see. I don't know where to apply the "\1" you show for replace expression as there isn't a field.

My entries result in the the following:
On books that have a mobi-asin, it adds the amazon ID with the same number as the mobi-asin and leaves the mobi-asin in place.

On books with an amazon ID but not a mobi-asin ID it deletes the amazon ID.

I can use this by checking each book for the mobi-asin id or just take a chance since they all seem to have it. But if feels incomplete and I wonder if that "\1" is crucial. Am I entering this in the right place? I do want it to only modify the books selected, not the entire library.
Use
Code:
Search Field: identifiers
Identifier Type: mobi-asin
Search For: (.*)
Replace With: \1
Identifier Type: amazon
Note the parentheses in the search for expression. They are important.

And yes, this S/R will create a new identifier "amazon". It won't delete the identifier "mobi-asin". You need to do that in a second-pass S/R, changing the destination identifier type to mobi-asin and removing the \1 from replace with.
chaley is offline   Reply With Quote