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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Reformatting large amo...
Power Automate
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.

Categories:
  • Verified answer
    v-LilyW-msft Profile Picture
    Microsoft Employee on at

    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 389

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard