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 / Replacing a character ...
Power Automate
Suggested Answer

Replacing a character in a file name

(0) ShareShare
ReportReport
Posted on by 5

Hello dear colleagues,

 

I need to create a flow in Power Automate that will handle the following. For example, I would like to check once a week the files added to a SharePoint library, and when it turns out that someone has uploaded a file with spaces in its name, it will replace those spaces in the file names with underscores “_” (e.g., plik testowy 123plik_testowy_123).

 

Important! This should apply only to files, not folders.

 

I have already tried a few methods, including an HTTP request to SharePoint, but it’s been going rather slowly for me. Does anyone have a concept of what such a flow should look like from start to finish?

Categories:
I have the same question (0)
  • Suggested answer
    Vejai SH Profile Picture
    555 on at
     
    How many folders and file you have to rename every run?
     
    Your flow will look like this.
     
     
    Thanks, 
    Vejai SH  
     
    Please mark as answer if my suggestion helps you.
  • Ellis Karim Profile Picture
    11,691 Super User 2025 Season 2 on at
     
    Thanks for posting.
     
    You can use the FSObjType to refine the flow further, to find files only:
     
    Get Files action using the File System Object type property (FSObjType):
     
     
    FSObjType eq 0   will return Files only
    FSObjType eq 1   will return Folders only
     
     
    Ellis Karim
    Ellis Karim
    elliskarim.com  |  LinkedIn  |  Bluesky
    If this solved your issue, please mark it as ✅ Accepted Answer. If it helped, feel free to give it a 🩷 Like!
     
  • Suggested answer
    Tomac Profile Picture
    3,951 Moderator on at
    In addition to what @Ellis Karim and @Vejai SH posted (both correct), you'll also need to look for and replace "%20" since space characters may have gotten replaced with the HTML code for a space at some point.
     
    Please remember to mark as correct the comments which helped resolve your issue.

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 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard