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 { $_.name –replace " ","" }

Here is more information on the Rename-Item command.

http://technet.microsoft.com/en-us/library/hh849763.aspx

Published inPowerShell

Be First to Comment

Leave a Reply

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