Command RN - rename archived files


Rename files inside of archive. This command is supported for RAR and ZIP formats. The command syntax is:

winrar rn <arcname> <srcname1> <destname1> … <srcnameN> <destnameN>

For example, the following command:

WinRAR rn data.rar readme.txt readme.bak info.txt info.bak

will rename readme.txt to readme.bak and info.txt to info.bak in the archive data.rar.

It is allowed to use wildcards in the source and destination names for simple name transformations like changing file extensions. For example:

WinRAR rn data.rar *.txt *.bak

will rename all *.txt files to *.bak.

WinRAR does not check if the destination file name is already present in the archive, so you need to be careful to avoid duplicated names. It is especially important when using wildcards. Such command is potentially dangerous, because a wrong wildcard may corrupt all archived names.