Created
January 25, 2021 19:38
-
-
Save jasonadsit/780143c4c3ee6e16f38ff80c26ad2bb8 to your computer and use it in GitHub Desktop.
filestuff.ps1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Days = (Get-Date).AddDays(-7) | |
Get-ChildItem -Path \\some\path,\\some\other\path -Recurse -ErrorAction SilentlyContinue | | |
Where-Object { $_.LastWriteTime -ge $Days } | | |
Select-Object -Property @{n='LastWriteTime';e={[string]$_.LastWriteTime.GetDateTimeFormats('s')}},FullName | | |
ForEach-Object { "$($_.LastWriteTime)|$($_.FullName)" } | | |
Tee-Object -FilePath "$HOME\Downloads\$(Get-Date -Format yyyyMMdd)-Files.txt" -Append |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment