How to Rename Files with a Date in PowerShell
To rename files with a date in PowerShell, pipe the files to Rename-Item and build each new name in a script block from BaseName, a formatted date and Extension: Swap Get-Date for $_.LastWriteTime to stamp each file with its own date. Below I’ll walk through both, plus the duplicate-name, colon and Windows PowerShell 5.1 traps … Read more