PowerShell 压缩子文件夹
$SourcePath = "D:\Reports\DeskReports\2016Q2"
$ArchivePath = "D:\Reports\DeskReports\Archive_2016Q2"
$7ZipPath = "D:\data\7-Zip\7z.exe"
Get-ChildItem -Path $SourcePath -Recurse | Where-Object {$_.PSIsContainer} | ForEach-Object {
$directoryFullName = $_.FullName
$directoryName = $_.Name
Invoke-Expression -Command "$7ZipPath a $ArchivePath\$directoryName.zip $directoryFullName\*"
}