Skip to content
This repository has been archived by the owner on Jul 18, 2024. It is now read-only.

Compress-Archive should support compressing hidden files #154

Open
jtmoon79 opened this issue Jan 24, 2024 · 2 comments
Open

Compress-Archive should support compressing hidden files #154

jtmoon79 opened this issue Jan 24, 2024 · 2 comments

Comments

@jtmoon79
Copy link

Summary of the new feature / enhancement

Currently Compress-Archive fails to compress hidden files. So for example, Compress-Archive -Path C:\My-Git-Repo will not compress the directory .git which is a directory with NTFS attribute hidden. Users must come up with various workarounds for this problem.

Users should be able to include NTFS hidden files and directories in the archive.

Proposed technical implementation details (optional)

Add a parameter switch like -Hidden or -IncludeHidden that will cause Compress-Archive to include all hidden files and directories under the -Path within the final archive file.

@jtmoon79
Copy link
Author

jtmoon79 commented Jan 24, 2024

Whoops, looks like this is implemented in #66
I don't see any autolinks from that Issue into this Powershell project so I wonder if the fix is included in any Powershell release. Maybe that Microsoft.PowerShell.Archive could be included in an upcoming Powershell release?

@mklement0
Copy link

@jtmoon79, as of PowerShell 7.5.0-preview.1 / 7.4.1, the bundled version of the module is 1.2.5

It would certainly be good to know in what PowerShell version the fix will land, but it will likely first become available as a NuGet package you can install on demand (a preview version is available, but the package was later unlisted).
See my comment on the linked issue.

@SteveL-MSFT SteveL-MSFT transferred this issue from PowerShell/PowerShell Jan 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants