Code:
Add-Type -Assembly System.IO.Compression.FileSystem
function Compress-CompatibleArchive {
param (
[String[]] $Path,
[String] $DestinationPath
)
$zipfilename = $DestinationPath
$sourcedir = $Path
$compressionLevel = [System.IO.Compression.CompressionLevel]::Optimal
[System.IO.Compression.ZipFile]::CreateFromDirectory($sourcedir,$zipfilename, $compressionLevel, $false)
}
Export-ModuleMember -Function Compress-CompatibleArchive
Command to execute : .PublishPlugin.ps1 C:UsersUSEROneDrivePicturestesting C:UsersUSEROneDrivePictureszipdest1.zip
O/P : This only zips the content inside the testing folder.
What I want is to include the testing folder along with the content.
Your help will be greatly appreciated.