Windows – Is it possible to create a RAR from specific selected files inside another RAR

archivingrarwindowswinrar

So I have one RAR and I want to create another RAR from only the (let's say 10K) files inside that compressed archive without uncompressing it.

Hope this makes sense and thank you all in advance!

Best Answer

I'm going to have to disagree with the other answers posted so far. What you're looking to achieve is technically possible with certain caveats. Looking at the RAR archive format, if solid archiving and encryption are not used it is possible to create a new archive with a modified main archive header and only the required file records (file headers, data blocks, service headers etc.) copied over without the data blocks needing to be decompressed first.

The process should be similar to this one for ZIP files, suitably adjusted for the RAR format of course.

Also, I'd like to note that WinRAR already does this to some extent, i.e. if you delete files from a non-solid RAR archive it does not decompress the data in any way, though of course temp files may be used for safety.

So what are your options here?

  1. If you don't need the 50k files you can delete them directly from the source archive. If solid archiving wasn't used no decompression and recompression will be required.

  2. If you might need some of the files later you can copy the source archive and then follow option 1.

  3. Of course you can always extract and recompress only the required files as a new archive.

  4. Finally, like I said above if solid archiving wasn't used a new archive with only the required files can be created without decompression. However, since this is such an uncommon requirement I'm pretty sure no program already exists that can do this, so you'll have to write one yourself or wait till someone does so.

Note: Answer was posted after receiving confirmation from the WinRAR developer that the technical analysis was sound.

Related Question