Use the built-in calibre tool to batch convert the e-book format

Source: Internet
Author: User

In the past, calibre was used to convert the e-book format first, then convert it, copy the converted file, and rename it.

Although batch import and conversion are supported, copying and renaming must be processed. Later, we found that calibre had its own command line conversion tool, and wrote a batch processing tool to convert all the specified formats of e-books in a folder in batches.

Copy the following code to notepad, save it as a. BAT file, copy it to the e-book folder, and double-click it to run.

@echo offfor %%a  in (*.azw3) do (  "d:\Calibre Portable\Calibre\ebook-convert.exe" "%%~a" "%%~na.epub"  ping -n 30 127.1>nul)pause

 

Calibreinstall to change the path of ebook-convert.exe. If the file to be converted is large, you need to extend the wait time and change the value 30 in the fourth row to 100 or another greater value.

If you want to create another format, for example, if the original e-book is in. MoBi format, change *. azw3 in the second line to *. MoBi. For example, in the format of. txt, set % ~ in the third line ~ Change na. Epub to % ~ Na.txt.

 

The same Code can also be used to convert the music format. Copy the following code to notepad, save it as a. BAT file, copy it to the folder of the music file, and double-click it to run.

@echo offfor %%a  in (*.wav) do (  "d:\lame3100\lame.exe" -V0 "%%~a" "%%~na V0.mp3")pause

In the same example, install uninstall to change the path of lame.exe.

The above code transfer out of MP3 is the best dynamic encoding. Other encodings are required, such as static encoding. Change the third line:

 "d:\lame3100\lame.exe" -b 320 "%%~a" "%%~na b320.mp3"

The following code is not required because the lame will wait for the previous operation to convert the file:

  ping -n 30 127.1>nul

Use the built-in calibre tool to batch convert the e-book format

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.