Quote:
Originally Posted by BetterRed
@ Vortex - can you post
1. what you get when you double click the HTMLZ
2. what you get when you Send the HTMLZ To your batch file
Or are they the same ?
I would expect to see something like
Code:
echo copy "Title - Author.HTMLZ" "Title - Author.ZIP"
"C:\Program Files\Program Files Portable\ubook\uBook.exe" "Title - Author.ZIP"
Send To on "«library path»\Title - Author.HTMLZ" will invoke your batch file with this command
Code:
C:\htmlz2zip.bat "«library path»\Title - Author.HTMLZ"
I don't understand why you are iterating through a directory, why don't you
extract the string before the ".HTMLZ" from %1 into %N (name)
concatenate %N and ".ZIP" to create %F,
copy %1 to %F
run ubook with %F
BTW: You should delete the ZIP when ubook exits. Its bad practice to leave files in book files that calibre doesn't know about
BR
|
BR, I didn't write the batch file, I'm useless at coding, it's all double dutch to me. Putting "echo" infront of the copy command is stopping the batch from working so this is what I get with '@echo on'.
1. When I double click the HTMLZ I get:
================================================== ===
C:\Program Files\Program Files Portable\Calibre Portable\Calibre Library\Carolin
e B. Cooney\Freeze Tag (6)>for /F "tokens=* delims= " %a in ('dir/b *.htmlz') do
(
copy "%a" "%~Na.zip"
"C:\Program Files\Program Files Portable\ubook\uBook.exe" "%~Na.zip"
)
C:\Program Files\Program Files Portable\Calibre Portable\Calibre Library\Carolin
e B. Cooney\Freeze Tag (6)>(
copy "Freeze Tag - Caroline B. Cooney.htmlz" "Freeze Tag - Caroline B. Cooney.zi
p"
"C:\Program Files\Program Files Portable\ubook\uBook.exe" "Freeze Tag - Carolin
e B. Cooney.zip"
)
1 file(s) copied.
================================================== =
(it works fine)
When I 'Send to' the HTMLZ to the batch file I get:
================================================
C:\>for /F "tokens=* delims= " %a in ('dir/b *.htmlz') do (
copy "%a" "%~Na.zip"
"C:\Program Files\Program Files Portable\ubook\uBook.exe" "%~Na.zip"
)
File Not Found
C:\>Pause
Press any key to continue . . .
================================================
(batch file is in C:\)