Created
November 18, 2018 16:47
-
-
Save Al-un/33d59b541e1822c84647ad53b9bc18be to your computer and use it in GitHub Desktop.
Renaming files based on Regex matched groups
This file contains 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
Get-ChildItem | Rename-Item -WhatIf -NewName {$_.Name -replace '(\d{2})-(\d{2})-(\d{4})', '$3-$2-$1' } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
WhatIf
to see the output without running the command