Powershell Tip #92: Rename the prefix of files using Insert method

By | March 1, 2016

Tip: You have a list of files with a specific prefix and you want to rename that.

For example, here you want to fix a wrong name WORSTATION to WORKSTATION.

Get-ChildItem-Workstation

Insert-method-string-powershell

Parameter 1 : the start index (the position)
Parameter 2 : the string to insert

String.Insert Method (Int32, String)
https://msdn.microsoft.com/en-us/library/system.string.insert(v=vs.110).aspx

Rename-Item-Bulk-Workstation


previous-buttonnext-button

Leave a Reply

Your email address will not be published.