powershell rename file 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"}