How do I rename a file in a 7zip archive using the CLI?

I am looking for how to rename files in 7zip archive on command line (unix).

+3


source to share


1 answer


The p7zip Unix tool is based on 7zip and should support the same command line options described in its help file.

To rename from the CLI you need version 9.30 or higher, and to rename multiple files in one go, you need at least version 15.05 (which cannot be ported yet):

http://www.7-zip.org/history.txt

Syntax for renaming files inside archives



7za rn <archive_name> <src_file_1> <dest_file_1> [ <src_file_2> <dest_file_2> ... ]

      

It also allows you to move files around eg. to subdirectory:

7za rn archive.7z old.txt new/location/new.txt

      

+6


source







All Articles