Sharing some useful tips, solutions and notes for Geeks.

Thursday, February 9, 2023

How to modify the extensions of all files in a folder using Powershell script

 This topic covers how we can change a particular extension of all the files in a folder in bulk using powershell script.



get-childitem *.jpeg | Rename-Item -newname { $_.name -replace '.jpeg','.jpg' }



What this does is it search for .jpeg files in a folder, then replace all such file extensions to .jpg. Likewise, we can use same script for renaming other extensions too.

No comments: