How To Rename a File With PowerShell

In this blog post, I will show you a very simple and handy PowerShell cmdlet that renames a file without using Windows explorer.


The rename-item cmdlet can rename an existing file name with a new name as shown below.

In my case, I have a file called 25.substring which I will rename to 25.1.substring.ps1

Rename-Item .\25.SubString.ps1 25.1.SubString.ps1

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.