Possible to batch zip files with same name different extension

Talk about Keka
Forum rules
Talk about Keka here. For bugs go to Issues.
Post Reply
somnamblst
I know Keka
I know Keka
Posts: 2
Joined: Wed Jan 30, 2019 3:20 pm

Possible to batch zip files with same name different extension

Post by somnamblst » Wed Jan 30, 2019 3:30 pm

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.
User avatar
aone
Mr. Keka
Mr. Keka
Posts: 264
Joined: Sun Feb 26, 2012 8:42 pm
Contact:

Possible to batch zip files with same name different extension

Post by aone » Thu Jan 31, 2019 11:42 am

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.
aone ~
somnamblst
I know Keka
I know Keka
Posts: 2
Joined: Wed Jan 30, 2019 3:20 pm

Possible to batch zip files with same name different extension

Post by somnamblst » Thu Jan 31, 2019 1:19 pm

Thanks. I have seen some bash scripts but none do what I need.
User avatar
aone
Mr. Keka
Mr. Keka
Posts: 264
Joined: Sun Feb 26, 2012 8:42 pm
Contact:

Possible to batch zip files with same name different extension

Post by aone » Sat Feb 02, 2019 10:18 am

Because you need something so specific you'll need to craft the script yourself.
aone ~
Post Reply