View Single Post
Old 03-28-2015, 10:33 AM   #42
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.
 
Posts: 13,544
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Well never having used 7za (the command line tool) it took a few minutes

Code:
for /r %1 in (*.original_epub) do 7za a "%~p1""%~n1".7z "%1"
This will create a new 7Z archive within the same folder that the original_epub file was located with the same name as the original_epub that contains a single file.

There are NO processes left running after this command; the only issue is that I'm not sure how to have 7za drop the file after it has been added. This could be done by a second for command

Code:
for /r %1 in (*.original_epub) do del "%1"
PS: I only SAW your reply about 10 minutes ago; in that time I located the 7zip command line version, installed it, wrote the batch line, tested it, AND wrote this message.

PPS: Quite likely no need to compress due to the fact that an epub actually IS a zip file (albeit with the possibility that not all components of it might be compressed. So one could add the -x0 switch to the command line

Last edited by PeterT; 03-28-2015 at 10:47 AM.
PeterT is offline   Reply With Quote