Zip a Folder without changing applications

I see a number of posts about zipping files/folders.
All of them 'take control' of the computer for a short time.
Is there a way to zip a folder that does not require the finder to be the front
application.
Goal is to 'watch' a parent folder.
When a new folder is added.
Zip that new folder and delete the original (as an option).
But the macro cannot change the current frontmost application.
Possible?

Hey @troy,

See the zip and ditto command line utilities.

In the Terminal:

man zip
man ditto

zip is a bit simpler and in some ways more powerful – IF you don't need to retain Mac resources, Finder tags, and such.

-Chris

Hey @ccstone I would have to make the terminal active though. Correct?
The goal is to do the zip and optional delete completely transparent to the user.
Not changing any active application and showing now prompts etc etc.

Hey @troy,

Not at all.

Keyboard Maestro can run shell scripts.

Execute a Shell Script action.

-Chris

1 Like

right, ok, I'll work on this a bit later, really appreciate your input. Also found this.
That I believe will be very helpful to work with.
thank you @ccstone and also @JMichaelTX for your 'always' help!

1 Like