rss logo

PowerShell Script to collect modified files

A PowerShell script to trace modified files and export them into a csv report. Here, for example, we will trace every files which have been modified one days ago.

Code

########################### # author : shebangthedolphins.net # version : 1.0 # date : 2016.04 # role : Trace modified files in a csv file # other : # updates : # - 1.X (x/x/xxxx) : $date_D=[dateTime]$(get-date) $date_B=$date_D.AddDays(-1) $date=$(Get-Date -Format 'ddMMyyyy') Get-ChildItem -Path C:\ -Recurse | Where-Object { $_.CreationTime -ge $(Get-Date $date_B -Format 'MM/dd/yyyy') } | Export-Csv "C:\Report_Directory\$(Get-Date -f yyyy-MM-dd-HH-mm)_rerpot.csv"
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Contact :

contact mail address