Created
August 13, 2025 21:24
-
-
Save jwarwick-bry/cd486b3867d4a43c4d77189c34018be1 to your computer and use it in GitHub Desktop.
Fix accidentally repeated filename extensions in Windows. For instance, if your Windows Explorer had the hide filename extensions option turned on, so you added filename extensions which then were actually extraneous.
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
| get-ChildItem -recurse |?{ $_.name -match "(\.[A-Z]{1,5}){2,}" } |%{ $FIXED = $_ -replace "(\.[A-Z]{1,5}){2,}",'$1' ; move-Item -verbose "$_" "${FIXED}" } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment