powershell replace rename code example
Example 1: powershell rename replace
ls *.csv | Rename-Item -NewName {$_.name -replace "Default","VOD"}
Example 2: powershell rename item
Rename-Item
[-Path] <String>
[-NewName] <String>
[-Force]
[-PassThru]
[-Credential <PSCredential>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Example 3: powershell replace and rename file name
Get-ChildItem -Path "C:\All" -Filter "*.pdf" | Rename-Item -NewName { $_.BaseName.Replace(".","_") + $_.Extension }