View Single Post
Old 09-12-2014, 10:07 AM   #12
Shady3
Junior Member
Shady3 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Sep 2014
Device: Personal Computer
Quote:
Originally Posted by eschwartz View Post
I am far more comfortable writing linux shellscripts than windows batch files.
I forgot that the percent symbol needs to be doubled when used in windows scripts instead of the command prompt. (linux does not use two different forms.) Use this:

Code:
del conversion.log
for /r %%I in ("*.epub") do (
    echo ******************************* >> conversion.log
    echo Converting "%%~dpnI.epub" to PDF >> conversion.log
    ebook-convert "%%~dpnI.epub" "%%~dpnI.pdf" >> conversion.log
)
Change
Code:
ebook-convert "%%~dpnI.epub" "%%~dpnI.pdf" >> conversion.log
to
Code:
ebook-convert "%%~dpnI.epub" "%%~dpnI.pdf" [options go here] >> conversion.log
if you want to change the conversion settings.

Moral of the story -- my bad skills are nearly as bad as your bad skills, but worse because I don't realize it.

P.S. Leave in the ************* it is there to separate the conversion logs for each other. It is plain text to be written to the file. (The "echo" command prints text out.)
On second thought -- it doesn't really matter, I only stuck it there in the first place in order to record what was getting done. Just in case it ever becme important -- for instance, if you wanted to see what settings were used and print out potential errors and stuff. Just like Job Details in the calibre library window.
It works!!

Thank you so much for your time. I thought it was something impossible to do.

Thank you!!!!!!!!!
Shady3 is offline   Reply With Quote