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