web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : eHCIqehK0jUVSnCgjkGsjT
Power Automate - Building Flows
Unanswered

changing certain words in a sp file name to upper case

Like (0) ShareShare
ReportReport
Posted on 30 Jan 2019 19:00:10 by

Hi,

 

I have about 200+ files uploaded in a document library. All the file names for respective files in SharePoint follow upper/lower format. So each word in a file name has first alphabet set in upper case and remaining alphabets in lower, same goes for other words in file name. A sample file name is as follows: Monthly Cfo Mm Budgeting Llc 1-29-19. I had achived this sort of file naming convention via a flow running on a document library, pelase see screenshots. 

Scr1.PNGScr2.PNGScr3.PNGScr4.PNGscr5.PNG

 

 

The above flow works without an issue but i have anohter challenge.

Now the requirement is if a file name contains words like: Cfo, Mm and Llc then they should be changed to upper case :CFO, MM, LLC. If a file name does not contain such words then will remain as is. I believe this would be possible to do, I will have to setup a separate flow as I already ran the above flow on a document library so if someone can assist, it will be a big help. I guess there will be formula changes in my existing flow.

 

P.S: This operation is required for all the existing documents, not looking to automate when a file is created/uploaded, thanks in advance.

I have the same question (0)
  • mydevexperience Profile Picture
    35 on 30 Jan 2019 at 23:52:57
    Re: changing certain words in a sp file name to upper case

    For task 2 you could use similar logic but the event you could use is when a file is created (SharePoint). I haven't tested this yet.

     

    Thanks

  • mydevexperience Profile Picture
    35 on 30 Jan 2019 at 23:48:33
    Re: changing certain words in a sp file name to upper case

    Hi @Anonymous,

     

    You have two tasks to do:

    (1) Existing document names to rename to capital letters depending on the condition.

    (2) When a new file is copied to a library then rename to captial letters if it meets the criteria.

     

    For task 1 you need flow step SharePoint Get Items. Then within the apply each loop check the condition something like below to add a function (fx).

    @contains(items('Apply_to_each')?[toLower('{FilenameWithExtension}')], 'cfo') contains 'cfo'.

     

    If yes then copy the file to a new location with new filename with captial letters. Delete the current file. Then move the newly created file to the old location.

     

    Let me know how it goes.

     

    Thanks

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 783 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 515 Moderator

#3
trice602 Profile Picture

trice602 299 Super User 2025 Season 2

Last 30 days Overall leaderboard