Quote:
Originally Posted by ZeBuddha
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.
|
I don't think that there would be a problem, did you try the command with (*.*)? I believe that what would happen would be the (*.*) command would take a snapshot of the directory and then run with it from there the first time it was run, sort of like taking a dir.
To be on the safe side, you could always just mimic the command with (*.doc) then another line with (*.rtf) then (*.txt) etc. But I think *.* should work OK.
Yeah, you can separate commands with a CRLF, (or a return) without a problem. The semicolon is in the PATH and other environment variables as far as I am aware.
You can convert your chm to html with hh.exe. hh.exe -decompile <out> <in> at least that's what I've seen online...