Command R - repair a damaged archive
Archive repairing consists of two stages. First, the damaged archive is scanned for recovery record (see the rr command). If archive contains the previously added recovery record and if damaged data area is continuous and smaller than error correction code size in recovery record, chance of successful archive reconstruction is high. When this stage has been completed, a new archive is created, named as fixed.arcname.rar, where 'arcname' is the original (damaged) archive name.
If damaged archive does not contain the recovery record or if archive cannot be completely recovered due to severe damage, second stage is performed. During this stage only the archive structure is reconstructed and it is impossible to recover files which fail checksum validation, but it is still possible to recover undamaged files which were inaccessible due to a corrupt archive structure. Generally this is useful for non-solid archives. In a damaged solid archive, often, only the first file may be recovered during the second stage. This stage is not performed for archives with encrypted file names, which can be repaired only if recovery record is present.
When this stage has been completed, a new archive will be created, named as rebuilt.arcname.rar, where 'arcname' is the original archive name.
By default, repaired archives are created in the current folder, but you can append an optional destpath\ parameter to specify another destination folder.
This command is the command line equivalent of the file management command Repair archive.
Example
repair buggy.rar and place the result to 'c:\fixed' folder
WinRAR r buggy.rar c:\fixed\