Here is a quick and fast way to bulk-rename files like photos, or other files. Have a look:
#requires -Version 1.0 $Path = "$home\Pictures" $Filter = '*.jpg' Get-ChildItem -Path $Path -Filter $Filter | Rename-Item -NewName {$_.name -replace 'DSC','TEST'}
Simply adjust the path and the filter to target the files. In the example, all *.jpg files in the pictures folder are checked, and the keyword “DSC” is replaced by “TEST”. Make sure you adjust the script parameters to your needs.
To rename files recursively, add the –Recurse parameter to Get-ChildItem. But, be careful. This small piece of code can rename thousands of files in a blink of an eye.