remove an infected file from an archive

COMODO anti-virus detected a virus inside a compressed (RAR) file. selecting Quarantine or Remove removes the entire archive. is there a way to remove only the infected file?

The only solution I can think of is to unpack the archive, remove the virus and pack the archive again (without the virus).