56

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?

4 Answers 4

93

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.

4
  • 10
    And windows is especially stupid, since it copies from temp drive instead of moving. Which is very inefficient if the temp folder is on the same drive
    – galinette
    Jul 1, 2016 at 9:29
  • 4
    @galinette I think it's the application telling windows if it has to copy or moving. But as specified above, 7-Zip doesn't know if temp is in the same drive.. so it goes for copying
    – Jack
    Nov 30, 2017 at 9:53
  • How come I never had this problem with WinRAR?
    – Shayan
    May 17, 2019 at 12:01
  • 1
    I'm really curious, did WinRAR used another way to do so ?
    – Maskim
    Jan 19, 2022 at 8:42
59

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.

2
  • You are the real MVP good sir! Dec 5, 2017 at 2:45
  • 3
    As noted, though not clarified, in the accepted answer, this DOES NOT work if using drag-drop to extract. If you use drag-drop, this setting has no relevance. Oct 26, 2018 at 4:58
1

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
0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .