Skip to content

Instantly share code, notes, and snippets.

@debuglevel
Last active December 25, 2022 18:34
Show Gist options
  • Save debuglevel/7dd16b12d252ee6452572f10e0217db9 to your computer and use it in GitHub Desktop.
Save debuglevel/7dd16b12d252ee6452572f10e0217db9 to your computer and use it in GitHub Desktop.
PowerShell: rename all files of a type to prefix their modification datetime
Get-ChildItem *.pdf | Rename-Item -newname {$_.LastWriteTime.toString("yyyy-MM-dd-HH-mm") + $_.Name }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment