Search code examples
c++command-linezipunzip7zip

Extract file with 7Zlib command line into directory


I would like to extract a file with 7za.exe (Link to download 7za.exe command line).

I can extract with the commands e or x, but my files are extracted in the current file. It is a mess, that is why I want to specify the destination directory.

I already tried this command but it won't work :

7za e myZipFile.zip myDestinationFolder
7za x myZipFile.zip myDestinationFolder

It says No files to process


Solution

  • Finally I've just find the way to extract my zipped files in another folder ! By default 7z extract files into the current folder...

    This allow to extract the files in the c:\soft folder :

    7z e archive.zip -oc:\soft *.cpp -r
    

    The trick is that we have to attache the command -o directly before our destination directory ! So beware : no space between the command -o and our destination directory path.