foreach ($Folder in Get-ChildItem -Path $Current | Where-Object { `
$_.lastwritetime -lt $LatestDate `
-and $_.mode -Match "d" `
-and $_.ToString().ToUpper() -ine "LOGFILES" `
})
--- end first code snippet ---
if (Test-Path($Folder) `
-and Test-Path($LogsFolder) `
-and Test-Path($DataListHeader) `
-and Test-Path($DataListFooter))
|