I have a situation where users have uploaded several files but without any naming convention. So some of the file names are in upper case while some are in lower case . So Now I have to build a script that can read the file name from document library and then change the format to following convention: First letter of the word must be in caps and remaining letters in lower case. For example, if a file name is "construction monthly reports" or "CONSTRUCTION MONTHLY REPORTS" then it should be renamed to following: "Construction Monthly Reports".
Is this possible to do by leveraging some sort of a script? I am working with SharePoint online. If someone has come across this situation, can you please provide the solution you took. For now the app should be able to perform this change for all existing files, in future, whenever a file is uploaded then it must be renamed as per this rule.
Can someone help with a solution (Workflow, CSOM, JS etc.), if powershell is a solution then I will go with that as well. thanks in advance.