Right now I have one button to archive a folder full of images using the same name as the folder, then another to change the file extension from ZIP to CBZ. Can it be done with just one button?
@set var={file}
Copy ARCHIVE HERE AS "{$var}.zip"
Rename "{$var}.zip" TO "{$var}.cbz"
Couple of improvements to that:
@nofilenamequoting
@set var={file|noterm}
Copy ARCHIVE HERE CREATEFOLDER "{$var}.zip"
Rename "{$var}.zip" TO "{$var}.cbz"
That assumes you are selecting a single folder and turning it into .cbz
On the other hand, if you are in the folder and want to select some or all files and add them to an archive named after the current folder (not the selection), try this:
@nofilenamequoting
@set var={sourcepath|nopath|noterm}
Copy ARCHIVE HERE CREATEFOLDER "{$var}.zip"
Rename "{$var}.zip" TO "{$var}.cbz"
Is it possible to make it work with one or more selected folders, turning each one into .cbz?
Thanks for the replies!
I haven't tested it much but this seems to work:
@nofilenamequoting
@dirsonly
Copy "{filepath}*" ARCHIVE HERE CREATEFOLDER "{file|noterm}.zip"
Rename "{file|noterm}.zip" TO "{file|noterm}.cbz"
Neat. But the whole thing uses only one thread (or core). Multithreaded would be a lot faster.
That must be a limitation of 7-Zip, i guess.
I get Zip Error 18 when using the single button. When using the last button for multiple folders I get the error on the first folder but not the rest.
And none of the CBZ files open in my comic viewer. Which is interesting because if I use my separate buttons to make a zip then change to cbz, they work fine.
Actually not true. If I use Copy ADDTOARCHIVE HERE then convert to cbz it opens fine.
But if I use Copy ARCHIVE=single,keepfolder HERE then convert to cbz, it doesn't open!?
Where did the "single,keepfolder" stuff come from? You should not need that with any of the buttons above.
What's the full command (including other lines) that you're using? Also, which version of Opus?
It's nothing to do with the commands above, it's a different issue. If I use the first command in my previous post then change from zip to cbz it works. But if I use the singe,keepfolder one and run it on multiple folders, it creates archives fine, but changing from zip to cbz breaks something and my reader can't read them.
As for full command, I just tried your suggestions above and they gave me the errors.
Currently on 10.5.0.2
Grab one of the newer betas, I think there was a bug with "single,keepfolder" in 10.5.0.2-beta where it'd cause an unnamed folder entry to be added to the zip, which some programs don't like (including Opus itself, now ).
No change with 10.5.0.6
It's a mystery of the highest order!
Maybe the CBZ reader you're using doesn't like it if all the files are in a subdirectory? Do you actually want/need the "keepfolder" part?
The reader doesn't care, it works either way.
I guess I'll just stick with my current method. Using Copy ADDTOARCHIVE HERE to turn folders into archives one at a time, then renaming zip to cbz. that's the only method that actually works...