Extracting .7z file with Unrar.exe and command line?

2

With WinRar.exe 5.00 we can extract a .7z file. (with right click on a file and extract it) but with Unrar.exe 5.00 and the following command line

C:\Program Files\WinRAR>unrar x "C:\Users\Mohammad\Downloads\somefile.7z"

I get the following message:

UNRAR 5.00 freeware      Copyright (c) 1993-2013 Alexander Roshal

C:\Users\Mohammad\Downloads\somefile.7z is not RAR archive
No files to extract

How can we extract .7z files with Unrar.exe with command line?

Mohammad Dayyan

Posted 2015-10-30T04:24:32.730

Reputation: 1 543

Answers

4

Winrar supports a lot of file types (source) and is a utility that supports more than just unarchiving:

WinRAR provides complete support for RAR and ZIP archives and is able to unpack CAB, ARJ, LZH, TAR, GZ, ACE, UUE, BZ2, JAR, ISO, 7Z, XZ, Z archives.

Whereas unrar is only an unarchiver specifically for rar files.

You should be able to use Winrar to extract 7z archives though:

winrar.exe x c:\file.7z

Note: I am away from my windows box to verify, but that should do it.

nerdwaller

Posted 2015-10-30T04:24:32.730

Reputation: 13 366

I tested, but the following error has occurred for each file : ! C:\Users\Mohammad\Downloads\somefile.7z: Cannot open simefile.jar – Mohammad Dayyan – 2015-10-30T05:20:32.693

Sounds like a separate issue, what command exactly are you entering? It's either bad flags or perhaps a corrupt archive (in which case you can check the hash if the download source provides it). – nerdwaller – 2015-10-30T05:24:36.253