Add/Update/Remove Single File in Zip File

Discussion in 'macOS' started by weizilla, Jun 12, 2008.

  1. weizilla macrumors regular

    Feb 7, 2008
    How do you add/update/remove a single file from an existing zip or rar (or any compressed) file on a mac?

    In Windows, you have the Winzip/Winrar app which simply shows the contents of the file in an interface that you can drag files into and out of. I can't for the life of me find a similar app for Mac. All of the apps I found simply uncompresses the entire zip file with no interface whatsoever.

    My problem essentially is that I'm changing files inside of a compressed file but it uses a specific format so I don't know how to recreate the compressed file. I can open and uncompress the file perfectly so normally on Windows, I can extract single files, change them and add them back with no problems.
  2. xroox macrumors newbie

    Jan 19, 2009

    Excellent question, would also like to know the answer to this.
  3. belvdr macrumors 603

    Aug 15, 2005
    No longer logging into MR
    Not sure about zip, but with tar:

     tar uvf <name of file>.tar <filename to update>
    That will update the file in the tarball.

    You can use:

    tar --delete uvf <name of file>.tar <filename to remove>
    to delete a file from a tarball.
  4. tplatt macrumors newbie

    Aug 30, 2009
    The zip command line has a -d or --delete option as well, which will remove one or more files from an existing zip archive. Open a terminal window and type man zip for details ... a LOT of details :)
  5. cozappz macrumors newbie

    Jan 23, 2012
    Is there any GUI application which can do what WinRAR/WinZip do on windoze?
    I mean, OS X is famous for its GUI too, not only for the BSD heritage :p
  6. metallicpail2 macrumors newbie


    Dec 14, 2015
    Might be a little late but in case other people have this question, here is the answer:

    If you are looking for a GUI that does it on Mac, BetterZip is a great app that shows you the content of a zip before unpacking and you can edit it. It also adds a plug in to the quicklook so you can preview the content of zip file. However it's an app that costs money.
    If you don't want to spend money and you know a little bit about the terminal, then here is the terminal code for editing a zip file (it is also much faster than any GUI in case you need to edit large zip files).

    navigate to your folder with terminal using the cd and ls command.
    zip -d <> <file you want removed>
    if you need to add/edit etc anything to a zip simply type zip in the terminal and it will give you the options

Share This Page

5 June 12, 2008