Skip to content

My first PowerShell command – Rename Files

This is my first power shell command. I wanted to remove all spaces from the file names in my current directory.

Dir | Rename-Item –NewName { $ –replace " ","" }

Here is more information on the Rename-Item command.

Published inPowerShell

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *