Monday, 23 February 2015

Bulk File name change using powershell

First create ps.ps1 file and add below code.
Get-ChildItem -Filter "*New*" -Recurse | Rename-Item -NewName {$_.name -replace 'New','ooo' }
Now create a filenamechange.bat
add below code.
Powershell.exe -executionpolicy remotesigned -File  C:\Users\Admin\Documents\Test\ps.ps1
Now place 2 above files and your source files under C:\Users\Admin\Documents\Test
Run batch file.