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 02-01-2015, 04:04 PM   #1
fibero
Junior Member
fibero began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2011
Device: sony prs-t1
Add books in bulk

How can I transfer to Calibre all books in a PC folder instead of one by one? I have read several tricks in other sites but none has worked. Thanks.
fibero is offline   Reply With Quote
Old 02-01-2015, 05:11 PM   #2
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,647
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@fibero - if you can get the paths to all the book files (epub, mobi, txt etc) into a file, then you could edit it into a script that used calibredb add command to add each book.

Suggest you experiment with a few books and a test library

BR
BetterRed is offline   Reply With Quote
Advert
Old 02-01-2015, 05:30 PM   #3
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
You can drag-and-drop files onto calibre to add them, or use the Add books toolbar icon. Both allow you to select/drag multiple books.

The Add books toolbar icon also has a dropdown that allows you to choose a folder and import all books in that folder. It is the third option.
eschwartz is offline   Reply With Quote
Old 02-01-2015, 05:33 PM   #4
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by BetterRed View Post
@fibero - if you can get the paths to all the book files (epub, mobi, txt etc) into a file, then you could edit it into a script that used calibredb add command to add each book.

Suggest you experiment with a few books and a test library

BR
If it was really necessary to use a script, couldn't we just use:

Code:
for file in *.epub *.mobi *.azw3 *.txt; do
    calibredb add $file
done
or the Windows equivalent?

And then drop that into the folder and double-click.
eschwartz is offline   Reply With Quote
Old 02-01-2015, 06:52 PM   #5
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,647
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by eschwartz View Post
If it was really necessary to use a script, couldn't we just use:

Code:
for file in *.epub *.mobi *.azw3 *.txt; do
    calibredb add $file
done
or the Windows equivalent?

And then drop that into the folder and double-click.
Does that not assume all the formats are in the same folder or at least in an orderly folder structure?

I was assuming from this

Quote:
I have read several tricks in other sites but none has worked
that the books were scattered around a tree in a disorderly fashion.

I've run into this with a couple of new calibre installs. I've used a file locator such as agent ransack to find files in a tree (device), sort by file type, remove unwanted types/files, copy paths to a file (e.g. addbooks.bat) and wrap calibredb-add " and " around each line.

I guess I could drag drop out of the file locator, or create hardlinks in a folder and add books from there. But the advantage of 'my way' is that the batch file itself provides a simple audit trail with no effort. The alternative would be to use a file system log analyser to extract an audit trail...

BR
BetterRed is offline   Reply With Quote
Advert
Old 02-01-2015, 07:13 PM   #6
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
That is when I pull out find, but I am not sure that can be duplicated in Windows batch without using gfind from gow or something. Which obviously requires downloading and installing yet more tools (and most people don't need unix tools for windows on an ongoing basis).

But the OP said "a folder", so hopefully... ?

...

Or something like:

Code:
recursedirs()
{
for file in *.epub *.mobi *.azw3 *.txt */ ; do
    if [[ -d "${file}" ]]; then
        cd "${file}"
        recursedirs
    else
        calibredb add "${file}"
    fi
done
}
Obviously, the best way of doing it is with "calibredb add --recurse ./" or the equivalent via the GUI.
The one time this won't work is when you want to import files from all over and don't want calibre to search your entire C: drive trying to find books -- then I guess a dedicated Ransack would be better for weeding out the noise. Because calibre will of course pick up on a lot of stuff, including HTML and ZIP files and all word documents etc.

calibre is capable of traversing a single directory tree and importing all recognized ebook types, recursively, on its own though -- if that is what you need.
eschwartz is offline   Reply With Quote
Old 02-02-2015, 02:54 PM   #7
fibero
Junior Member
fibero began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2011
Device: sony prs-t1
Add books in bulk

Thankyou all. Given my limited knowledge, I will try Option 3 of the Add Books button in the GUI as recommended by eschwartz.
fibero is offline   Reply With Quote
Old 02-02-2015, 07:46 PM   #8
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Forgive the g(r)eek. You can ignore that part...

Option three it is!
eschwartz is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Add Covers in Bulk sp000n Library Management 2 01-27-2015 01:07 AM
How to bulk add the same book cover Rusherman Library Management 4 05-03-2013 08:55 PM
Merge Formats library into Metadata library? Or, Add Format in bulk? Sabardeyn Library Management 5 01-23-2013 06:00 AM
Trying to add large library of books - add books seems to have hung nicknefarious Library Management 1 06-18-2012 09:32 AM
K2 skins recommendations/reviews? Wanted: add grip, no bulk, good fit/coverage Starhawk Amazon Kindle 12 03-24-2009 04:01 PM


All times are GMT -4. The time now is 10:45 PM.


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