Quote:
Originally Posted by RbnJrg
Very nice script! And if you have a folder only with .mobi books and want to apply kindlestrip, how would it be the .bat file? Many thanks in advance.
|
That's very easy. You simply omit the KindleGen part, change the file selector to .mobi and end up with this very simple script.
Code:
DEL conversion.log
FOR %%f IN ("*.mobi") DO (
ECHO ******************************* >> conversion.log
kindlestrip "%%~nf.mobi" "%%~nf.new" >> conversion.log
IF EXIST "%%~nf.new" (
DEL "%%~nf.mobi"
REN "%%~nf.new" "%%~nf.mobi"
) ELSE (
ECHO "%%~nf.mobi" was NOT stripped! >> conversion.log
)
)
Hopefully, none of the "real programmers" will see this, because it's a quick & dirty solution that doesn't follow the traditional programming guidelines.
BTW, as with the other batch file there's always the possibility that something might go horribly wrong.
Always keep backups and don't use it with the original files.