banner
咕咕乔

咕咕乔

咕咕咕
github
email

Convert MOBI files to EPUB format in bulk.

📚 Preparation#

Since Komga cannot recognize MOBI format ebooks, these files need to be batch converted to EPUB format for reading in Komga.

📥 Download and Install calibre#

The conversion can be done using calibre, so you need to download and install calibre first. You can download the installer for your operating system from the official website at https://calibre-ebook.com/download.

⚙️ Configure ebook-convert#

After installing calibre, you need to configure the correct path for ebook-convert.exe in order to perform the conversion. Please set it according to your installation path.

🔄 Batch Convert MOBI to EPUB#

Using the provided script, you can easily convert all MOBI files in a directory to EPUB format. Follow these steps:

@echo off
setlocal EnableDelayedExpansion

for /r %%i in (*.mobi) do (
    set "filename=%%~ni"
    set "extension=%%~xi"
    set "directory=%%~pi"
    set "output=!directory!!filename!.epub"
    <ebook-convert.exe path> "%%i" "!output!"
)

set /p confirm=Are you sure you want to delete all .mobi files in this directory and its subdirectories? (y/n) 
if /i "!confirm!"=="y" (
    for /r %%i in (*.mobi) do (
        echo Deleting "%%i"...
        del "%%i"
    )
    echo All done!
) else (
    echo Operation cancelled.
)

echo All done!
pause

  1. Paste the provided script into a text editor and replace <ebook-convert.exe path> with your actual path.
  2. Save the script as a batch file (.bat), for example, convert.bat.
  3. Place the convert.bat file in the directory that contains the MOBI files you want to convert.
  4. Double-click convert.bat to run it, and the script will automatically convert all MOBI files to their corresponding EPUB files.

❗️ Delete Original MOBI Files (Optional)#

If you want to delete the original MOBI files after the conversion is complete, you can follow these steps:

  1. After the conversion, the script will ask if you want to delete all MOBI files. Enter y or n as prompted.
  2. If you enter y, the script will delete all MOBI files in the directory and its subdirectories.
  3. If you enter n, the script will not delete the MOBI files.

Please note that the deletion operation cannot be undone, so proceed with caution.

🎉 Completion#

After completing the above steps, your MOBI files will be successfully converted to EPUB format and can be enjoyed in Komga!

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.