powershell rename file extension code example
Example 1: rename file powershell
mv original_filename.whatever new_filename.whatever
Example 2: Best way to change the file extension in powershell
$path = 'C:\temp\ImportantFile.txt'
Copy-Item -Path $path –Destination ([io.path]::ChangeExtension($path, '.bak')) -Verbose