提交 fd79746b 编写于 作者: R Ravi Chande

Handle errors in cleanup_perf.ps1

上级 41f6d8dc
......@@ -36,12 +36,32 @@ if ($ShouldArchive) {
# Move all etl files to the a folder for archiving
echo "creating ToArchive directory"
mkdir ToArchive
echo "moving $CPCLocation/DataBackup* to ToArchive"
mv $CPCLocation/DataBackup* ToArchive
echo "moving $CPCLocation/consumptionTempResults.xml to ToArchive"
mv $CPCLocation/consumptionTempResults.xml ToArchive
mkdir ToArchive/PerfLogs
xcopy /S C:\PerfLogs ToArchive\PerfLogs
if (Test-Path $CPCLocation) {
try
{
echo "moving $CPCLocation/DataBackup* to ToArchive"
mv $CPCLocation/DataBackup* ToArchive
echo "moving $CPCLocation/consumptionTempResults.xml to ToArchive"
mv $CPCLocation/consumptionTempResults.xml ToArchive
}
catch
{
echo "Copying CPC data failed"
}
}
if (Test_Path C:\PerfLogs)
{
try
{
mkdir ToArchive/PerfLogs
xcopy /S C:\PerfLogs ToArchive\PerfLogs
}
catch
{
echo "Copying PerfLogs failed"
}
}
ls ToArchive
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册