View Single Post
Old 06-30-2013, 04:29 PM   #7
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by RbnJrg View Post
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.
Doitsu is offline   Reply With Quote