Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 04-14-2022, 03:32 PM   #1
betelguese
Enthusiast
betelguese began at the beginning.
 
Posts: 41
Karma: 10
Join Date: Nov 2010
Device: none
Question Batch rename files with ISBN?

Hi, I have a bunch of files in the following format:
ISBN number.pdf
I'd like to automatically batch rename these files to Title_Author_ISBN.pdf
For example:
"9781119591146.pdf" would be renamed to "Chemistry Essentials For Dummies_Moore_9781119591146.pdf"
Can this be done with Calibre? Or else how? Thanks for any ideas
betelguese is offline   Reply With Quote
Old 04-14-2022, 03:35 PM   #2
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 8,656
Karma: 61234567
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Don't mess with the files in the Calibre library directory! Treat it as a black box.

You can export them elsewhere (and then delete them from the library if you don't want to keep them there). Preferences > Saving books to disk lets you change the path.

You'll want to go to Preferences > Add your own columns and set up a 'column built from other columns' using {identifiers:select(isbn)} for use in the save template.

Try out something like {title}_{author_sort}_{#isbn} after setting up the column -- I'm not entirely sure how to extract just the last name so hopefully someone else will chime in

https://manual.calibre-ebook.com/template_lang.html gives a good overview of everything.

Last edited by ownedbycats; 04-14-2022 at 03:41 PM.
ownedbycats is offline   Reply With Quote
Old 04-14-2022, 11:42 PM   #3
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
I think you mean you have these files outside of calibre. In that case, you could:
  1. Add the books to calibre. As the books appear to be using the ISBN for the file name, you should change the template on the "Adding books" page of the preferences to something like "(?P<isbn>\d+)".
  2. Make sure the title is correct. Calibre will attempt to extract this from the book, but, it might not be correct. If it doesn't, you can try using the metadata download to get the correct details.
  3. Use "Save to disk" to export the books from calibre. When doing this, you need to use a save template to set the file name. The one suggested by @ownedbycats is fairly close to what you want. But, there is no need for the separate column. "{title}_{author_sort}_{isbn}" should work.
davidfor is offline   Reply With Quote
Old 04-18-2022, 04:26 PM   #4
betelguese
Enthusiast
betelguese began at the beginning.
 
Posts: 41
Karma: 10
Join Date: Nov 2010
Device: none
Thanks for your replies, this is what I did:
1) Placed the original files in a newly custom created folder
2) Opened Calibre and "Add Books" , pointing to this folder
3) "Edit Metadata" and download covers, title and other metadata from ISBN
4) "Save to disk" and saved to another custom created folder
5) In the folder mentioned in step 4 I was able to see the files in the right format (title_author_isbn.pdf). I also see "opf" files associated with each pdf, should I keep those? For my purposes the pdf's alone seem to fulfill my needs

Last edited by betelguese; 04-18-2022 at 04:29 PM.
betelguese is offline   Reply With Quote
Old 04-18-2022, 04:45 PM   #5
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 8,656
Karma: 61234567
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
You don't need to keep the OPF files unless you plan to re-import to Calibre.
ownedbycats is offline   Reply With Quote
Old 04-18-2022, 10:12 PM   #6
betelguese
Enthusiast
betelguese began at the beginning.
 
Posts: 41
Karma: 10
Join Date: Nov 2010
Device: none
Thanks, actually for my purposes I delete all the Calibre created library and leave it empty until the next batch of files need to be renamed
betelguese is offline   Reply With Quote
Reply

Tags
batch rename, isbn


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
RTF files with wrong DOC extension - batch identify and rename? rebl Other formats 6 05-26-2015 04:10 AM
Batch rename caused error and loosing a file DrChiper Editor 3 12-24-2013 08:17 AM
rename files richreads Sigil 2 01-01-2013 04:53 PM
rename files kawayama Sigil 9 12-22-2011 12:30 AM
PRS-500 Is there Batch Rename option in Book Designer? alophind Sony Reader Dev Corner 1 08-30-2007 09:42 PM


All times are GMT -4. The time now is 06:07 AM.


MobileRead.com is a privately owned, operated and funded community.