I am trying to write a powershell script which go to specific folder which have multiple folders containing Excel file. File name is as example 1_RIM_Reports_201510.xlsx 2_Rim_Reports_September.xlsx
Now I want to change replace the word RIM with NIR how can i do that for multiple files.
1_NIR_Reports_201510.xlsx 2_NIR_Reports_September.xlsx
Get-ChildItem $directory -Recurse |
Rename-Item { $_.name -replace '*RIM*.xlsx', '*NIR*.xlsx' }