Page 1 of 1

Possible to batch zip files with same name different extension

Posted: Wed Jan 30, 2019 3:30 pm
by somnamblst
I am seeking a solution for zipping lots of files in a folder. There is an html and a corresponding js file with the same name and an images folder that contains the bitmaps that all the js files call. I want the individual zips to contain the matching html and js file while retaining the name of those files, and the images folder

I tried this in Automator and it did not work, because it zipped all the html and js files into one, and would not allow me to select the images folder.

mv "$1" "${2%.*}".zip

So it seems the logic needs to be, if two files have the same name, add them to the zip file AND include the contents of the images folder.

Possible to batch zip files with same name different extension

Posted: Thu Jan 31, 2019 11:42 am
by aone
I'm not sure how Keka can help here. For such a specific issue, you are probably going to need a custom script, for example in bash.

Possible to batch zip files with same name different extension

Posted: Thu Jan 31, 2019 1:19 pm
by somnamblst
Thanks. I have seen some bash scripts but none do what I need.

Possible to batch zip files with same name different extension

Posted: Sat Feb 02, 2019 10:18 am
by aone
Because you need something so specific you'll need to craft the script yourself.