$deletedfiles = 0
$files = get-childitem -Path $path
$10days = (get-date).AddDays(-8)
foreach ($file in $files){
if ($file.LastWriteTime -le $10days){
remove-item -Path $file.fullname -Recurse -Force
$log += "Deleted:" + $file.name
$deletedfiles ++
}
}
$log += "Deleted: " + $deletedfiles + " Files"
ASKER
Windows 7 is an operating system from Microsoft. Features include multi-touch support, a redesigned Windows Shell with a new taskbar, referred to as the Superbar, a home networking system called HomeGroup, and performance improvements.
TRUSTED BY
ASKER