In the Zip cmdlets, provide a way to extract the contents of a `-SpecificFolder` without the folder itself
- Dominant language
- C#
- Stars
- 11.5k
- Forks
- 960
- PR merge metrics
- No merged PRs in 30d
Description
## Is Your Feature Request Related To A Problem? Please describe.
If you have a Zip archive and you want to extract only the _contents_ of a specific folder, you have to extract the folder and move / copy the contents to where you want them. It's a pain point that could be easily solved.
## Describe The Solution. Why is it needed?
When using the `-SpecificFolder` parameter of the cmdlets below, we should add a mutually exclusive `-SpecificFolderContent` parameter that would extract the _contents_ of a specific folder in the Zip archive. The `-SpecificFolder` parameter will extract the folder as well as it contents. The cmdlets affected are:
* `Install-ChocolateyZipPackage`
* `Get-ChocolateyUnzip`
This became a problem when creating the [`emacs.portable`](https://community.chocolatey.org/packages/emacs.portable/28.1.0) package. The folder inside the Zip archive was named `emacs-28.1` and the folder I wanted to put the contents into is `emacs`. You can see the hoops I had to jump through in the [files](https://community.chocolatey.org/packages/emacs.portable/28.1.0#files).
## Additional Context.
N/A
## Related Issues
N/A
Contributor guide
Research direction
Start by locating the implementations of Install-ChocolateyZipPackage and Get-ChocolateyUnzip and read how -SpecificFolder is currently handled. Add the mutually exclusive -SpecificFolderContent behavior so extraction places the selected folder's contents without the folder itself, then verify both cmdlets and their existing extraction tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100