I'm looking for a way to zip (or 7z) files via a file manager in such a way that the original folder is deleted right after the zipping finished (less clutter when batching compression of multiple folders).
In "Total Commander" it was called "Move to Archive".
Is there any OSX file manager which has this functionality?
I've tried PathFinder 7 and ForkLift, but they don't seem to have this option (or it is hidden somewhere).
TIA.
Karol
-
Have you tried Keka? kekaosx.com– ajkblueCommented Nov 25, 2014 at 14:23
2 Answers
You can make use of automator to make a simple program that can do such a thing. Make use of : Create Archive : to do it, and add an additional block to delete the original file.
-
1This additional block to delete files would take the output from create archive? Or is there another way to pass original files? Commented Nov 25, 2014 at 14:37
You can create You're own Automator script for this.
Create Service in Automator as an input argument choose Files and directories
then add Shell script which as an input takes arguments instead of stdin. Then paste this script inside:
tar -czf "$(dirname $1)"/"Archive-$(date +%Y-%m-%d-%H-%M-%S)".tar.gz "$@" && rm -rf "$@"
I can provide screenshot, but I have Polish OS X.
-
1Depending on the locale settings,
date
may return a string with characters which are not allowed in a filename. So it might be better to define the format you wantdate
to return.– nohillside ♦Commented Nov 25, 2014 at 14:39 -
1