View Single Post
Old 03-27-2014, 09:05 PM   #24
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,825
Karma: 30277270
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@PeterT - the batch file is used as the 'program' that does an 'open' verb in the OS File Association table for HTMLZ - there's no need to look for the HTMLZ file because its full path is passed as the only argument as in

Code:
C:\htmlz2zip.bat "%1"
So when its used the command will be something like

Code:
C:\htmlz2zip.bat "C:\Program Files\Program Files Portable\Calibre Portable\Calibre Library\Caroline B. Cooney\Freeze Tag (6)\Freeze Tag - Caroline B. Cooney.HTMLZ"
So the batch file needs copy the .HTMLZ to a .ZIP in the same location with the same file name, run ubook with the .ZIP and when ubook finishes delete the .ZIP.

@Vortex try this

Rename htmlz2zip.bat to htmlz2zip.batsave
Then replace htmlz2zip.bat with this
Code:
REM echo off !unREM this when you're happy it works
setlocal ENABLEDELAYEDEXPANSION 
set str=%1
set name=%str:HTMLZ=ZIP%
copy %1 %name%
start /wait "C:\Program Files\Program Files Portable\ubook\uBook.exe" %name%
del %name%
There should be no need to use Open With - just press 'V' and select HTMLZ or click HTMLZ in Book Details

BR

Last edited by BetterRed; 03-27-2014 at 10:46 PM.
BetterRed is offline   Reply With Quote