FlattenPaths has no affect when appending to ZIP

Topics: User Forum
Oct 18, 2013 at 5:52 AM
Hello,

I have read through the discussions and issues pages here and I am aware that this issue was supposed to have been fixed in changeset 99185 and from what I can gather it was released in version 2.1 around about August of last year.

However, I have the following foreach loop
foreach ($folder in $archiveItems) {
    Write-Zip -Path $folder.FullName -FlattenPaths -OutputPath $zipFile -Append
}
When I run this it is keeping the folder strucutre of the source location. I thought that maybe it was a PowerShell 2 and PSCX 2.1.1 issue so I downloaded PowerShell 3 and PSCX 3.1.0 and the same behaviour is occuring.

I was hoping that someone could either see a problem in my script above, or verify that this issue is occuring again.

Thanks

Tim
Coordinator
Oct 18, 2013 at 5:56 AM
There are a number of issues with the archive/zip support. We were hoping to get some of these issues fixed for 3.1.0 but it didn't work out. We will push for a 3.1.1 release in the coming months to try to fix the archive/zip commands.
Oct 18, 2013 at 6:05 AM
Thanks for the prompt reply, I can work around the folder structure in the mean time.

Tim