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.