cd C:\Users\Public\Maarch\maarch_capture\files\WORK_OMT get-childitem "C:\Users\Public\Maarch\maarch_capture\files\WORK_OMT" |? {$_.psiscontainer -and $_.lastwritetime -le (get-date).adddays(-1)} |% {remove-item $_ -force }