2


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

1

2 Answers 2

2

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.

1
  • 1
    This 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
2

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.

2
  • 1
    Depending 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 want date to return.
    – nohillside
    Commented Nov 25, 2014 at 14:39
  • 1
    You're right. Thank's for pointing this out. Commented Nov 25, 2014 at 14:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .