Renaming part of a file name on multiple files
Thu Dec 09 2021
Eric Thomas D. Cabigting
How to rename part of a file name in multiple files.
- Open Powershell (win+x) and click on Power shell
- use CD to path to folder
CD PATH\TO\FOLDER
- Use the following command to replace a part of the file name of all the files in the folder
ls | Rename-Item -NewName {$_.name -replace "OLD-FILE-NAME-PART","NEW-FILE-NAME-PART"}
- The "OLD-FILE-NAME-PART" must be an exact character set of the part of the filename you want to replace
- The "NEW-FILE-NAME-PART" will replace the part of the old part.
Let's Connect
Hey! My inbox is always free! Currently looking for new opportunities. Email me even just to say Hi! or if you have questions! I will get back to you as soon as possible!