3

I want to be able to right click multiple folders inside of a directory in nautilus, and be able to create separate zip archives from those folders in that same directory. If possible it would also be great if it automatically deleted the old folders.

So, if I have 30 folders, I want to select those using control-shift, then go to scripts and run the script, and just have those 30 folders compressed into separate .zip archives, and have the old folders deleted (if possible).

Anyone know how to accomplish this? I am not good with terminal, and am looking for a script solution.

2
  • So 30 folders selected, something magical happens and you have 30 zip files and the folders are gone?
    – Nate
    Sep 19, 2012 at 14:51
  • if possible. I at least need to be able to create multiple archives from folders. Nautilus allows you to extract multiple, so it should have a feature to create multiple. Sep 19, 2012 at 15:24

1 Answer 1

4

This looks like it will help.

http://ubuntuforums.org/showthread.php?t=1060130

for i in * ; do zip -vr "$i.zip" "$i" ; mv "$i.zip" /move/zipfiles/here/ ; done

you can change the zip to another compression method, just make sure to change the options to match as well. Also it will do all hence the *. So move the folders you want to compress into one folder and go crazy. if you want to delete the folder after just add:

for i in * ; do zip -vr "$i.zip" "$i" ; mv "$i.zip" /move/zipfiles/here/ ; rm -r "$i"; done
0

You must log in to answer this question.

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