Skip to content

Instantly share code, notes, and snippets.

@arumoy
Created December 26, 2019 14:27
Show Gist options
  • Save arumoy/eeeb40f9e17cd714dc4e5650fbb5d1a3 to your computer and use it in GitHub Desktop.
Save arumoy/eeeb40f9e17cd714dc4e5650fbb5d1a3 to your computer and use it in GitHub Desktop.
Rename folder by regex - PowerShell
Get-ChildItem -Directory -Filter "*2019" | Rename-Item -newname { $_.Name -replace "([0-9]{2})-([0-9]{2})-([0-9]{4})", "`$3`-`$2`-`$1` "}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment