PowerShell Script to Split, Replace and Rename File Names in the Folder Recursively and in Bulk
Important Note: The File renaming in bulk can result in dangerous results in not handled correctly. This post is ONLY to share my learning’s to serve you as a guidance to build your own scripts for similar requirements. Requirement: I had a folder which contained sub-folders and then files. The naming convention of file names is “<string> – <string> – <string>.mp4”. Out of which the first String is too lengthy and common for all files which I wanted to get rid of it. Script: function Rename-Files ($folder) { $files = dir $folder | where {! $_.PsIsContainer} # $files […]
Read more