param([string]$srcPath, [string]$destPath)
if (-Not (Test-Path $srcPath))
{
echo "Wrong path srcPath"
return
}
if (-Not (Test-Path $destPath))
{
echo "Wrong path destPath"
return
}
$srcpath=Join-Path -Path $srcPath -ChildPath "*.dmp"
$fileList=Get-ChildItem -path $srcpath
if ($fileList.Length -lt 1)
{
echo "list empty"
return
}
$targetFile=$fileList[0]
$zipFile= $destPath + $targetFile.BaseName + ".zip"
echo "Target File " + $targetFile.FullName
Compress-Archive -Path $targetFile -DestinationPath $zipFile
echo "Compress complete" + $zipFile
Remove-Item -Path $targetFile
echo "Delete " + $targetFile
'Develop' 카테고리의 다른 글
C# HttpListener External IP (0) | 2019.08.13 |
---|---|
Flutter Error 1 (0) | 2019.08.04 |
wpf textbox twoway (0) | 2018.12.13 |
c# interface method 정의 (0) | 2018.12.04 |
WPF Binding (0) | 2018.11.12 |