iceStatus "Fax" ([ServiceProcess.ServiceControllerStatus]::Running)
    }
}
#
# update report
#

$notDeletedFiles = Get-ChildItem $directory | where-object -FilterScript { $_.Extension -eq ".spl" -or $_.Extension -eq ".shd" }

$deletedFileNames = New-Object System.Collections.ArrayList
$notDeletedFileNames = New-Object System.Collections.ArrayList

if($notDeletedFiles -eq $null)
{
    foreach($file in $printFiles)
    {
        $deletedFileNames += $file.Name
    }
}
else
{
    foreach($file in $printFiles)
    {
        [bool]$notDeleted = $false
        foreach($notDeletedfile in $notDeletedFiles)
        {
            if($file.Name -eq $notDeletedFile.Name)
            {
                $notDeleted = $true
                break
            }
        }
        if($notDeleted)
        {
            $notDeletedFileNames += $file.Name
        }
        else
        {
            $deletedFileNames += $file.Name
        }
    }
}

if($deletedFileNames.Length -gt 0)
{
    $deletedFileNames | select-object -Property @{Name=$localizationString.fileName; Expression={$_}} | convertto-xml | Update-DiagReport -id DeletedFiles -name $localizationString.deletedFiles_name -verbosity Informational
}

if($notDeletedFileNames.Length -gt 0)
{
    $notDeletedFileNames | select-object -Property @{Name=$localizationString.fileName; Expression={$_}} | convertto-xml | Update-DiagReport -id CannotDeletedFiles -name $localizationString.cannotDeletedFiles_name -description $localizationString.cannotDeletedFiles_description -verbosity Informational
}
