Skip to content

Instantly share code, notes, and snippets.

@arthurattwell
Last active August 6, 2023 17:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save arthurattwell/79a69ad9cda5e5518c6fe4c32d207b2c to your computer and use it in GitHub Desktop.
Save arthurattwell/79a69ad9cda5e5518c6fe4c32d207b2c to your computer and use it in GitHub Desktop.
Batch script to convert multiple epubs to mobi
:: This batch script converts all the epubs in its folder to mobi.
:: It requires that you have Kindlegen installed, see
:: https://www.amazon.com/gp/feature.html?docId=1003018611
:: Thanks http://www.mobileread.com/forums/showpost.php?p=2554984&postcount=2
:: For the latest version of this script, see
:: https://gist.github.com/arthurattwell/79a69ad9cda5e5518c6fe4c32d207b2c
:: Don't show these commands to the user
@echo off
:: Keep variables local, and expand at execution time not parse time
setlocal enabledelayedexpansion
:: Set the title of the window
title epub2mobi
echo This will convert all epub files here to mobi.
pause
for %%f in ("*.epub") do (
echo Converting "%%f"...
call kindlegen -dont_append_source "%%f" >> conversion.log
echo Done.
)
echo All done.
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment