Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error unzipping a file in cmd (using 7z in Windows)

Tags:

cmd

7zip

I am attempting to use 7 Zip through the command line. As you can see below, using the command 7z l lists the 3 files in the target zip file.

C:\Users\User1\Downloads>7z l recording_20130731180507.zip

--
Path = recording_20130731180507.zip
Type = zip
Physical Size = 311686

   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
2013-07-31 18:05:06 .....          655          655  SD_DISK\20130731\18\2013073
1_180505_A4BC_00408CC2B40B\recording.xml
2013-07-31 18:05:06 .....       309752       309752  SD_DISK\20130731\18\2013073
1_180505_A4BC_00408CC2B40B\20130731_18\20130731_180505_59EB_00408CC2B40B.mkv
2013-07-31 18:05:06 .....          279          279  SD_DISK\20130731\18\2013073
1_180505_A4BC_00408CC2B40B\20130731_18\20130731_180505_59EB_00408CC2B40B.xml
------------------- ----- ------------ ------------  ------------------------
                                310686       310686  3 files, 0 folders

However, when I attempt to actually unzip the file, I get a "no files to process error". I've never tried unzipping from cmd before. Do I have to try to dig into the zip file to extract those 3 files?

C:\Users\User1\Downloads>7z e recording_20130731180507.zip o-C:\users\User1\do
cuments\folder1\test


No files to process

Files: 0
Size:       0
Compressed: 311686
like image 729
austinthemassive Avatar asked Aug 01 '13 18:08

austinthemassive


People also ask

How do I open a 7z file with CMD?

To begin a session, open a terminal window. Invoke the version of 7Zip you are using by entering "7z" for P7Zip (7z.exe), or "7za" for 7Zip for Windows (7za.exe) to start either the P7-Zip or 7za application prior to entering commands.

Why is 7-Zip not working?

If 7-Zip option isn't appearing in the context menu and the option Integrate 7-Zip to shell context menu option is selected under Options, it's likely because you have installed the 32-bit version of 7-Zip on your 64-bit PC. You can open Programs and Features to check the version of 7-Zip.

How to zip a file using 7-Zip command line?

Use the “a” command to create a new archive file which can end in 7z, XZ, GZIP, TAR, ZIP, and many more. How to zip a file using 7-Zip command line? Use the “a” command to add files to the ZIP file.

How to fix 7-Zip Header Error in Windows?

Another method of fixing the header error of your 7-zip file is to use the command prompt i.e run CMD to repair or restore the corrupted/invalid Zip file. Use these steps and you will fix the error: Step 1: Open the "Command Prompt" of your system as an administrator and not as a standard user.

Why do I get a 7-Zip error while downloading?

Downloading error: The error of 7-zip file may also occur while downloading from the internet due to slow connection or bandwidth etc. that can also lead to CRR error. File header corruption: File header is the place to contain the file name, size, and extension, etc. These details help in accessing the file.

What does the you command do in 7-zip?

The "u" command in 7-Zip stands for update. This is a useful command and is great when you want to replace old files in your archive with newer files. This prevents needing to decompress and recompress the entire archive.


1 Answers

The option is -o, not o-. Run the command like this:

7z e recording_20130731180507.zip -o"C:\users\User1\documents\folder1\test"
like image 152
Ansgar Wiechers Avatar answered Oct 22 '22 15:10

Ansgar Wiechers