Ditto command: how to compress multiple files?

Does anyone know Ditto’s syntax for compressing (zipping) multiple files at once? (it works with a single file) my searches on the internet have been fruitless.

Usage: ditto [ ] src [ … src ] dst

I tried to put the paths to following without success:
ditto c -k --sequesterRsrc --keepParent filepath1 filepath2 filepath3 dest

I tried square brackets, commas, etc. nothing to do !

do you know about…

a. FolderItem.CopyTo:

b. Terminal: man ditto
You get on many pages the command syntax.
About path/Terminal: place pathnames with space(s) between quotes (regular, not typo quotes)…

c. I do not searched there, but a whole “book” exists about the Terminal:

Thank you but I know all this.
I just came across some bad news: “ditto: Can’t archive multiple sources”
yet the manual suggests this possibility !

Wouldn’t tar using compression be enough for your needs instead of ditto?

tar -cvzf MyCompressedFiles.tgz file1 file2 ...

1 Like

Why use ditto when the system provides zip ?

zip archive.zip screenshot1.png screenshot2.png

Thank you, yes i choose this solution ! (woks fine).

I have an app in the MAS that internally uses that command line in shell.