Run batch files from button in current lister

So I have a specific batch file I like to run when creating archives.
The primary purpose of the command is to convert any folder in the same folder into a cbz with no folder inside it.
I've been looking at all the zip to cbz and cbz creation topics and haven't really seen anything that works or I just haven't figured out how to get it to work.

This is the bat file I usually drag into a folder then double click to convert its contents. I've got a feeling its pretty obvious what I'm missing I just cant figure it out.
Thanks for the help.

@echo off
for /d %%X in (*) do (
    PUSHD "%%X"
    "D:\Program Files\7-Zip\7z.exe" a "..\%%X.zip" "*"
    POPD
)

If you really want to use the old DOS Batch method, just set the Function drop-down to MS-DOS Batch Function:


But it looks like that creates a .zip (not .cbz) file for each selected folder?

You can do that by selecting the folders and using this:

Clipboard%20Image


Or if you don't want to select things first, this will do the same on everything in the current folder:

Copy * ARCHIVE=single HERE

Caveat: That will also zip up any standalone files into archives as well, though, which you might not want.

Scripting can do more complex things, including excluding files and renaming the zip to .cbz. I think there are scripts on the forum which do that.

1 Like

Holy crap I'm stupid...
I didn't have 7zip installed on my D drive its on my C which would explain why it wasn't working for the last week I've been trying to get the command to run.
I always have my computers set up with 2 drives and only have the crucial stuff on the C drive.
Thank for the info anyways Leo. Much appreciated.

1 Like