View Single Post
Old 11-17-2012, 01:08 AM   #7
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,160
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Sure ..

At command line
Code:
for /r %1 in (*.mobi) do "c:\Program Files (x86)\Calibre2\ebook-convert.exe" "%~dpn1.mobi" "%~dpn1.epub"
In a batch file
Code:
for /r %%1 in (*.mobi) do "c:\Program Files (x86)\Calibre2\ebook-convert.exe" "%%~dpn1.mobi" "%%~dpn1.epub"
In either case it will go through all directories starting at the current directory and convert mobi files to epubs.

The difference in the two command lines is due to the interpretation of the % symbol at the command line, and in a batch (or cmd) file.

The weird stuff %~dpn1 is just extracting the drive, path and file name from the whole file name; ie dropping the extension.
PeterT is offline   Reply With Quote