I have 3 folders I want to compress to an archive and put that archive in a specific location. I'm running in to a few different issues depending on how I tackle the problem. All 3 files live in ~/Library/Logs/, one of the folders is the child of another folder within logs. Here's what the current structure looks like:
~/Library/Logs/ -Phone -Cort -Media -Cort -Logs
I want to compress "Phone", "Cort", and "Logs" (Media/Cort/Logs folder) from the ~/Library/Logs/ folder. Ideally I'd like to just have the zip archive laid out like this:
MyLogs.zip -Phone -Cort -Logs
The first issue is that I do not want to use the direct path (macintosh hd/users/MyAccount/Library/Logs/), I'd like to use ~/Library/Log/ since this will be used for multiple different users.
The second issue is that I do not want to have to choose or select the items via finder since the path will never change for these folders.
The ditto command seems to somewhat do what I want, it doesn't change the folder structure, but I can only do 1 folder at a time.
I've tried to use some similar automator setups such as this one Create a zip file using an Automator Service but I can't seem to make it work without the folder selection prompt, no matter how I pass my paths to it. Every other bash script or automator service seems to be zipping each folder individually, which I also do not want.