microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
111.66k stars 6.57k forks source link

[Feature] Smart Unzip #34506

Open hawkerm opened 2 months ago

hawkerm commented 2 months ago

Simple right-click "Smart Unzip to Folder" in shell context menu, when right-clicking on a zip file.

Feature Description

This context menu option for zip files (and please don't let me have to expand the menu to get to this on Win11...) automatically does one of two things:

Extra: pop-up a notification of some sort that shows the progress of the extraction and which of the two things occurred (or effectively what the folder name that was used of where the contents is [either the folder name within the archive or the name of the archive of the folder created for its contents]) - Have that auto-dismiss after a couple seconds after it's done uncompressing

Alternatively: If it's quick enough to inspect the archive and determine what behavior is needed when the context menu is opened, then the "Smart Unzip to Folder" could be instead be labeled "Smart Unzip to 'resultfoldername'" which will either be the name of the archive (indicating there's loose files) or the name of the inner folder within the archive. This would mean no notification is needed outside of indicating progress for long decompression operations.

Scenario

I was commenting on the reason why having zip file previews would be great in the File Explorer preview, and I realized what I really just want is this "Smart Unzip" feature...

Originally posted by @hawkerm in https://github.com/microsoft/PowerToys/issues/2205#issuecomment-2322745031

Please File Explorer support previewing the contents of zip without unarchived

Microsoft Windows File Explorer already supports viewing and editing ZIP archives without decompressing them:

This is about getting a preview when you're clicking on the file within the folder vs. having to try and find it in the folder list to navigate it like a folder:

image

If you have a ton of folders and or archives, trying to find them in the folder list is a pain, especially if it's something you just downloaded and is right here. The goal is to just have a quick glance within the contents to help make decisions on what to do with the file or how/where to extract it.

The majority of my workflows with zip files is:

  1. Find File
  2. Right-Click Context Menu
  3. (If on Windows 11...PITA) Expand Context Menu
  4. Got to 7-zip ->
  5. Open Archive
  6. See if the person who packaged the zip file put things in a root folder in the zip file or if there's just loose files everywhere... a. If the contents was a folder, do the above 2-4 context menu and do 7-zip -> Extract Here b. If the contents is a bunch of files, do the above 2-4 context and Extract to 'zip file name' folder ('demo' in this example)

Then I have a new folder with the contents of the zip file that I can use. Great! Oh, I have to do these 12 steps again, great...

weltyjp commented 1 month ago

Not entirely related but for Smart Unzip, I would like to see a way to automatically clean up (trash) the original Zip file after extraction. A checkbox on the extract dialog would do nicely. Rough mockup: dialog mockup