Change File Extension

This is a file to change the file extensions of (all) files in the same folder.

How

# script to change the file extension of multiple files

$old_extension = Read-Host "Old File extension: "
$new_extension = Read-Host "New File extension: "

Get-ChildItem *.$old_extension | ForEach-Object {
    Rename-Item $_.FullName -NewName ($_.BaseName + "." + $new_extension)
}

Write-Host "*******************************************************"
Write-Host "*                                                     *"
Write-Host "*                     Finished!                       *"
Write-Host "*                                                     *"
Write-Host "*******************************************************"

Read-Host

Please give credit for republishing