61

Whenever I extract an archive using 7-Zip, it performs a two step operation. First it extracts the contents of the archives to a temporary folder, then Windows copies the files from the temporary folder to the target directory.

The second part of this operation can take some time, especially if there were a large number of small files in the archive. It seems like the operation could be sped up if 7-Zip just extracted the files directly to the target directory to start with. Is there a way to make it do this?

JamesGecko
  • 2,120

4 Answers4

98

Doh! I really should have looked harder for an answer.

From the 7-Zip FAQ:

Why does drag-and-drop archive extraction from 7-Zip to Explorer use temp files?

7-Zip doesn't know folder path of drop target. Only Windows Explorer knows exact drop target. And Windows Explorer needs files (drag source) as decompressed files on disk. So 7-Zip extracts files from archive to temp folder and then 7-Zip notifies Windows Explorer about paths of these temp files. Then Windows Explorer copies these files to drop target folder.

To avoid temp file usage, you can use Extract command of 7-Zip or drag-and-drop from 7-Zip to 7-Zip.

JamesGecko
  • 2,120
63

You can press F9 inside 7-Zip, you'll get two panes. In the first you navigate to the archive you want to extract, and in the second you navigate to the folder where you want your files extracted. This will skip the temp folder step.

Olli
  • 7,739
mocceb
  • 757
2

Step by step to extract contents of a .7z directly into a target folder:

  1. Open .7z file in 7zip GUI
    • content inside .7z is shown
  2. Hit — Extract button
  3. Copy window opens
    1. Hit ... (browse) button
    2. Browse for folder window opens
      • Select target folder
      • Hit OK to close Browse window
    3. Hit OK in Copy window
  4. Extracting begins directly into target folder
spcsLrg
  • 529
-1

I can confirm each "solution" here (having tested with 32 and 64 bit variants) and I would like to add something: Drag and Drop is ALWAYS a two step solution when moving between applications, there's just no way around that even with apps inside the same development ecosystem like Microsoft or Adobe titles. The reason won't surprise you. Different applications don't talk to each other directly when moving files between them by drag and drop. This functionality is handled by the OS, no matter which OS you are using. On Windows, FileExplorer will take over from App-A (which is sending), and get a link to the file it is using--if a file does not exist yet, you will get the chance to save a file in some apps, others create a temporary file in a space you specify or use the system temp cache--; this link will then be used by App-B (which is receiving). A compressed archive is only a collection of bits that need to be unscrambled and decompressed into the file(s) the archive contains. When you drag and drop from the 7zip to a FileExplorer window, those files must first be decompressed to a temporary location as they don't yet exist, then they can be moved. This is because 7zip DOES NOT EXTEND the FileExplorer, it is a separate application. However, drag and drop between 2 windows of 7zip will not require this temporary space, it can do it all directly in memory. The same function is found by using the EXTRACT function and giving it a path to dump the files into. However, you should not MOVE or COPY if you wish to avoid temp-caching. Again, these create a temporary working copy, then move that to the path you give them. You can still select single or multiple items of varying type and size, then Extract them, or drag-and-drop into another 7zip window.