Quote:
Originally Posted by Excalibur
Put this line in a batch file named, say batch.bat:
Code:
for %%f in (*.lit) do lit2lrf --blank-after-para "%%f"
Then, run it in a directory where you want the contents converted. It is not recursive and will only work in one directory. I didn't need it to go to any directories below the main one, but if you want to figure out how to do that, go right ahead 
|
Would
Code:
for %%f in (*.*) do any2lrf --blank-after-para "%%f"
work too? Or would it go into an infinite loop in an attempt to convert lrfs to lrfs?
Also, I haven't handled .bats since the days of MS-Dos, so I don't remember if I had to include any kind of separator (eg. semi-colon) between commands. Would a NL/CR do?
I'm basically looking to make a "convert all to LRF" batch script for my incredibly jumbled ebook folders to use with libprs500. So something along the lines of the script line above, one each for lit2lrf, pdf2lrf, rtf2lrf, html2lrf & txt2lrf.
Also, as .doc and .chm formats are not included in libprs500 I'm also looking into apps to convert those to HTML and from there to LRF (which should work as long as the conversion to HTML is before the html2lrf conversion in the script).
I remember seeing a chm2html converter mentioned somewhere but can't find it anymore, and I haven't run into any doc2html or docx2html converters.