Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

changing certain words in a sp file name to upper case

(0) ShareShare
ReportReport
Posted on 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.

  • mydevexperience Profile Picture
    35 on at
    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 at
    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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1