Home » Questions » Computers [ Ask a new question ]

How can I bulk rename files in a RAR or ZIP archive on the mac?

How can I bulk rename files in a RAR or ZIP archive on the mac?

I have a set of archive files -- both zip and rar formats -- inside of which I need to rename some files. Specifically, I want to do something like this:

Asked by: Guest | Views: 405
Total answers/comments: 2
Guest [Entry]

"I think the easiest way you'll find to do this is to unpack each archive, do the rename operation, then repack it.

On Linux, I could use a FUSE filesystem to have transparently decompressed archives, which I could operate on like regular folders, using a batch script to do all the renaming. I don't know if that particular FUSE filesystem exists for Mac."
Guest [Entry]

"rar has a command line switch to rename files in the archive:

rar rn archive.rar filename newfilename

however the zip utility you're using does not. You'll need to extract, rename, and recompress as Ryan stated. There are other zip utilities for Mac which probably have this capability. I know 7-zip has supported renaming in archives since 2.30 beta 25, although I haven't checked if they support it from the command line. 7-zip is fairly extensive when it comes to command line options, so I'd assume it can."