Virtualization, Cloud, Infrastructure and all that stuff in-between

My ramblings on the stuff that holds it all together

POSH1Liner: Find files modified in the last n days and export as a formatted table with full path

Adjust the minus ( AddDays(-8) value to how many days back you want to check and run, it will output a list of files (with full path) that have a modified date later than the number you specified, handy for sorting out complex data merge issues.

$lastdate = get-date.AddDays(-8) ‘set the minus number to how many days you want to go back
Get-ChildItem -Recurse -File | Where-Object { $_.LastWriteTime -ge $lastdate } | format-table -autosize -property FullName

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: