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

Notifications

Announcements

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:
I have the same question (0)
  • Verified answer
    v-LilyW-msft Profile Picture
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard