I have *.ktx files that are in c:\inet\pub\upload directory with about 500 subdirectories. I need to create a txt file that lists all the ktx file paths between these dates: 2016-11-04 06:50 a.m. to 2016-11-08 08:25 a.m.
Of all the sub folders i need to exclude the “archive” folder.
Does this seem right?
Get-ChildItem C:\inet\pub\uploads\ -recurse -include @(“*.ktx”) |
Where-Object {$.CreationTime -gt “11/04/2016” -and $.CreationTime -lt “11/08/2016”} |
Select-Object FullName, CreationTime, @{Name=“Mbytes”;Expression={$.Length/1Kb}}, @{Name=“Age”;Expression={(((Get-Date) - $.CreationTime).Days)}} |
Export-Csv C:\report.txt
thanks for any help. I am a newb ! Split