You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 18, 2024. It is now read-only.
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.
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.
The text was updated successfully, but these errors were encountered:
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?
@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.
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 causeCompress-Archive
to include all hidden files and directories under the-Path
within the final archive file.The text was updated successfully, but these errors were encountered: