Skip to content

Feature Request: "Smart Extraction" logic (Auto-create folder only when necessary) 功能请求:“智能解压”逻辑(仅在必要时自动创建文件夹) #203

@Matty12138

Description

@Matty12138

Description:
I would like to suggest a "Smart Extraction" feature, similar to the one found in Bandizip. This would greatly improve the user experience by keeping the destination folder organized without manual intervention.

The Problem:
Currently, when extracting a folder, users often have to choose between "Extract Here" (which can clutter the directory if the archive contains many loose files) and "Extract to ''" (which can create redundant nested folders if the archive already contains a single root folder).

Proposed Feature:
Add a "Smart Extraction" option that automatically determines the extraction behavior:

If the archive contains a single top-level folder: Extract the contents of that folder directly to the current directory (to avoid Folder/Folder/Files).

If the archive contains multiple files or folders at the root: Automatically create a new folder named after the archive and extract everything into it (to avoid cluttering the current directory).

This logic ensures that there is always exactly one parent folder for the extracted content, regardless of how the archive was originally packed.

Benefit:
This would make 7-Zip more efficient for daily use by eliminating the need for users to "peek" inside an archive before deciding how to extract it.


描述:
我想建议增加一个“智能解压”功能,类似于 Bandizip 中的功能。这将通过减少手动干预来保持目标目录整洁,从而显著提升用户体验。

当前问题:
目前在解压时,用户通常需要在“提取到当前位置”(如果压缩包内文件很多,会弄乱目录)和“提取到‘<文件夹名称>\’”(如果压缩包本身就包含一个根文件夹,会导致出现多余的嵌套文件夹)之间做出选择。

建议功能:
增加一个“智能解压”选项,自动判断解压行为:

如果压缩包只包含一个顶级文件夹: 直接将其内容解压到当前目录(避免出现 文件夹/文件夹/文件 的情况)。

如果压缩包根目录包含多个文件或文件夹: 自动创建一个以压缩包命名的文件夹,并将所有内容解压其中(避免弄乱当前目录)。

这种逻辑确保了无论压缩包最初是如何打包的,解压后的内容始终只有一个父文件夹。

优点:
这将使 7-Zip 在日常使用中更加高效,用户无需在决定如何解压之前先“预览”压缩包内部构造。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions