Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I use 7-Zip under Windows 7 to extract all kind of archives. The ever-running problem is that there is not a single way to handle subfolders.

Some people create their archives like this (let's call it type A):

.
├── subfolder
│   ├── file 1
│   ├── file 2
│   └── ...
  • "Extract Here" will extract everything to subfolder/, which is fine;
  • "Extract to <Folder>" will create an extra subfolder level, which is annoying.

And other people create them like that (let's call it type B):

.
├── file1
├── file 2
├── ...
  • "Extract Here" will populate the current folder, which can bring a lot of mess if this folder already contains tons of other files, and which is very annoying;
  • "Extract to <Folder>" will create a subfolder and conveniently stuff it with the archive content, which is fine.

So this leaves two options: always choose to "Extract to <Folder>" and live with the extra subfolder for type A archives. Or open the archive before extracting it to check if this is a type A or B, and then appropriately select "Extract Here" or "Extract to <Folder>".

I usually do the latter, but I just discovered that KDE is offering a very handy Extract Archive Here, Autodetect Subfolder feature that automates that. It'll "Extract Here" for type A archives, and it'll "Extract to <Folder>" for type B archives.

I love this idea. Is there a Windows 7 tool offering this option? Preferably integrated in the explorer context menu? Maybe it's hidden somewhere in 7-Zip and I just didn't find it?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted
+150

I believe the File paths section on the Advanced tab of WinRAR's archive extraction dialog might be what you're looking for:

WinRAR advanced archive extraction options 1


Edit: All right, I believe I have it. On WinRAR's Options / Settings / Compression tab, select Remove redundant folders from extraction path.

WinRAR advanced archive extraction options 2

Here's what it does, according to the help file:

Remove redundant folders from extraction path

This option works only in context menus, only for single selected archive with single folder and no files in archive root folder and only for "Extract to DestName\" command, where 'DestName' is a name of folder proposed by WinRAR and based on archive name. If all these conditions are met, this option removes the top level folder based on archive name from extraction path.

For example, if you have Pictures.rar containing all files in 'Samples' folder and if you unpack it with "Extract to Pictures\" context menu command, WinRAR will place files to "Pictures\Samples" if this option is off and to "Samples" if it is on. So it helps to save one click, avoiding necessity to open 'Pictures' folder, which contains nothing but 'Samples'.

This option introduces an additional delay in the beginning of extraction, because WinRAR needs to scan an archive and analyze its folder structure. Note that context menu still displays the archive based folder name even if it will be removed from path when extracting. Showing the correct folder already in context menu would introduce a potentially annoying delay between right clicking an archive and displaying the context menu.

I just tried it and it works brilliantly, so you end up with either <current_folder>\<archive_name> or <current_folder>\<subfolder_name>, and never <current_folder>\<archive_name>\<subfolder_name>.

As for 7-Zip, I see that a request to copy this feature from WinRAR has been pending for more than 3 years.

share|improve this answer
    
Nope, I tried all four options and none of them is automatically checking if there's one and one subfolder only to switch between "extract here" and "extract to subfolder". This is to select if and how paths in the archives are handled. –  Laurent Couvidou Sep 19 '12 at 8:32
    
I've edited my question to try to clarify my point. –  Laurent Couvidou Sep 19 '12 at 8:49
    
@lorancou: Check my edited answer. –  Karan Sep 22 '12 at 0:18
    
Nice catch, this looks like it! Looks like you've earned my bounty ;) –  Laurent Couvidou Sep 23 '12 at 9:23
    
@lorancou: Thanks, both for the bounty as well as for making me search for this. Was one of those features I didn't even know I needed, till I started using it. :) –  Karan Sep 23 '12 at 18:12
add comment

I've not seen this in 7-zip. I use the option:

Extract to <Folder>

Not sure why you say this is annoying? The folder name given is usually the name of the folder it was last created in or just the name of the zip. I find in 90% of the cases this is just fine.

Alternatively you could go to the command line. See this post. I think that is the extent of options with 7-zip.

I'm not familiar with any other tools doing this on Win7.

share|improve this answer
    
I also do that, but then for archives that already have one unique subfolder you get a subfolder inside your subfolder. Which means an extra step to get to the actual files. When you do that a lot, it gets annoying. –  Laurent Couvidou Sep 18 '12 at 13:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.