Write-Zip Issues

Topics: User Forum
Mar 13, 2007 at 2:49 PM
I've been testing Write-Zip and have a few comments. They might even be bugs. First, when I create an archive with this command:

get-childitem -recurse -include *.vbs | write-zip -outputPath e:\temp\scripts.zip

I think everything is still flattened. There are subdirectories with .vbs files but the resulting zip shows everything in one root.

Also, the zip process is "touching" the file and changing it's last modified date. The zip process should store the file with it's original last modified date.

Jeffery Hicks
SAPIEN Technologies - Scripting, Simplified. www.SAPIEN.com
VBScript & Windows PowerShell Training - www.ScriptingTraining.com/classes.asp
Windows PowerShell? - www.SAPIENPress.com/powershell.asp

blog: http://blog.SAPIEN.com
blog: http://jdhitsolutions.blogspot.com

Mar 13, 2007 at 3:44 PM
The flattening is expected, since each file is piped in individually. There is already a work item for the 1.2 release to fix this: Write-Zip doesn't preserve dir structure.
If you have any ideas how this should behave, please share them with us.

WRT the modified date, can you create a workitem please?
Mar 14, 2007 at 10:17 PM
This discussion has been copied to Work Item 8907. You may wish to continue further discussion there.