$startingpath=”C:\”
$startingdate=$(Get-Date).AddDays(-7)
Get-Childitem $startingpath -Recurse | where-object {!($_.psiscontainer)} | where { $_.LastWriteTime -gt $startingdate } | foreach { Write-Host “$($_.LastWriteTime) :: $($_.Fullname) ” }
OR
foreach {Write-Output “$($_.LastWriteTime) :: $($_.Fullname) ” >> changedfiles.csv }
Top comments (0)