
You could use following PnP PowerShell to bulk rename files.
1.Create a csv file as following picture shows. In the csv file, fill in the file URL and new file name.
2.Please run below PNP PowerShell.
$SiteURL = "https://tenant.sharepoint.com/sites/emilytestnew"
$filePath = "C:\Users\Administrator\Desktop\filename.csv"
$csv = Import-Csv $filePath
Connect-PnPOnline -Url $SiteURL -Interactive
ForEach($Row in $csv) {
Rename-PnPFile -SiteRelativeUrl $Row.FileURL -TargetFileName $Row.NewFileName -Force
}
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.