Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Reformatting large amounts of file names in SharePoint

(0) ShareShare
ReportReport
Posted on by 6

I am currently trying to reformat the naming convention of 1000s of files in my company. I would like to set up a flow where I can upload these documents into a folder and have it change the name of the file. For example, if my current file name is: 14489-Johns to just replace the hyphen with an underscore and become 14489_Johns. I would like the flow to then move the file, once the name has been reformatted, to a different folder. 

Thanks in advance.

  • Verified answer
    v-LilyW-msft Profile Picture
    on at
    Re: Reformatting large amounts of file names in SharePoint

    Hi @zzuu4sh 

    Do you want to change these file's name in Original folder and move the files to another folder?

    You can take a try with the flowing steps.

    By default, Get files can only return the first one hundred files in the library, so its threshold needs to be increased by the way.

    Click Seetings->Enable Pagination->Set the Threshold above 1000 e.g. 1200.

    vLilyWmsft_0-1631068272343.png

    vLilyWmsft_1-1631068494941.png

    vLilyWmsft_2-1631070463444.png

    Expression:

    replace(outputs('Get_file_metadata')?['body/Name'],'-','_')

    vLilyWmsft_3-1631070510215.png

    vLilyWmsft_4-1631070588957.png

    This is my Original folder 

    vLilyWmsft_5-1631070722499.png

    After flow runs, those files will move to Destination folder with the new name.

    vLilyWmsft_6-1631070836870.png

    Hope the content above may help you.

    Best Regards

    If my solution helps, then please consider Accept it as the solution to help the other members find it more quickly.

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