Skip to content

Category: PowerShell

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

Leave a Comment