Skip to content

Instantly share code, notes, and snippets.

@jwarwick-bry
Created August 13, 2025 21:24
Show Gist options
  • Select an option

  • Save jwarwick-bry/cd486b3867d4a43c4d77189c34018be1 to your computer and use it in GitHub Desktop.

Select an option

Save jwarwick-bry/cd486b3867d4a43c4d77189c34018be1 to your computer and use it in GitHub Desktop.

Revisions

  1. jwarwick-bry created this gist Aug 13, 2025.
    1 change: 1 addition & 0 deletions fix_repeated_filename_extensions.ps1
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    get-ChildItem -recurse |?{ $_.name -match "(\.[A-Z]{1,5}){2,}" } |%{ $FIXED = $_ -replace "(\.[A-Z]{1,5}){2,}",'$1' ; move-Item -verbose "$_" "${FIXED}" }