Here’s a quick one-liner that can rename multiple files with PowerShell. The rename-item cmdlet can be used to search and replace text in the original filename.
dir "c:\Work" -s | rename-item -NewName {$_.name -replace "text-to-find","repacement-text"}
Here’s an example directory containing a few files that need renaming:
dir c:\work -s
Directory: C:\work
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 30/09/2019 21:11 0 01-Dunkelgrau-2019.bmp
-a---- 30/09/2019 21:11 0 01-Kalender-2019.bmp
-a---- 30/09/2019 21:11 0 02-Dunkelgrau-2019.bmp
-a---- 30/09/2019 21:11 0 02-Kalender-2019.bmp
-a---- 30/09/2019 21:11 0 03-Dunkelgrau-2019.bmp
-a---- 30/09/2019 21:11 0 03-Kalender-2019.bmp
-a---- 30/09/2019 21:11 0 04-Kalender-2019.bmp
Here’s a command that will rename some of the files, replacing “Kalender” with “Calendar”:
dir "c:\Work" -s | rename-item -NewName {$_.name -replace "Kalender","Calendar"}
We can check the results and see the file has been renamed
dir c:\work -s
Directory: C:\work
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 30/09/2019 21:11 0 01-Calendar-2019.bmp
-a---- 30/09/2019 21:11 0 01-Dunkelgrau-2019.bmp
-a---- 30/09/2019 21:11 0 02-Calendar-2019.bmp
-a---- 30/09/2019 21:11 0 02-Dunkelgrau-2019.bmp
-a---- 30/09/2019 21:11 0 03-Calendar-2019.bmp
-a---- 30/09/2019 21:11 0 03-Dunkelgrau-2019.bmp
-a---- 30/09/2019 21:11 0 04-Calendar-2019.bmp
The text to find is not case-sensitive so this works:
dir "c:\Work" -s | rename-item -NewName {$_.name -replace "dunkelgrau","DarkGrey"}
dir c:\work -s
Directory: C:\work
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 30/09/2019 21:11 0 01-Calendar-2019.bmp
-a---- 30/09/2019 21:11 0 01-DarkGrey-2019.bmp
-a---- 30/09/2019 21:11 0 02-Calendar-2019.bmp
-a---- 30/09/2019 21:11 0 02-DarkGrey-2019.bmp
-a---- 30/09/2019 21:11 0 03-Calendar-2019.bmp
-a---- 30/09/2019 21:11 0 03-DarkGrey-2019.bmp
-a---- 30/09/2019 21:11 0 04-Calendar-2019.bmp
The replacement text is case-sensitive however, as can be seen in this example:
dir "c:\Work" -s | rename-item -NewName {$_.name -replace "DarkGrey","lightgrey"}
dir c:\work -s
Directory: C:\work
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 30/09/2019 21:11 0 01-Calendar-2019.bmp
-a---- 30/09/2019 21:11 0 01-lightgrey-2019.bmp
-a---- 30/09/2019 21:11 0 02-Calendar-2019.bmp
-a---- 30/09/2019 21:11 0 02-lightgrey-2019.bmp
-a---- 30/09/2019 21:11 0 03-Calendar-2019.bmp
-a---- 30/09/2019 21:11 0 03-lightgrey-2019.bmp
-a---- 30/09/2019 21:11 0 04-Calendar-2019.bmp
For more examples, see the PowerShell docs for rename-item.