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 Automate
Answered

Renaming Files

(1) ShareShare
ReportReport
Posted on by 6

Greetings,

I have a folder with the following file that gets dropped using FTP. The file must be renamed after once it is available in the specified folder. 

  • Downloaded Naming Convention: CompanyName_ReportName_VendorName_2024_07_17_v1.0.xlsx
  • Desired Naming Convention: CompanyName_ReportName_VendorName.xlsx
I tried using Replace() expression but it require that I hardcode the file name. However the last part of the file name changes every week.
Regards
  • Suggested answer
    Nived_Nambiar Profile Picture
    on at
    You can set the namein rename file action, so u can remove the date component from the file name using replace text action and set the resultant name in rename file (s) action. see below
    1. Assume this is input file name

       
    2. Use Replace text action so to replace date component_version with empty string as shown below

      Now Replaced variable stores the output- i,e replaced file name with no dates or versions
       
    3. Now use rename file to set new file name as shown below

       
    4. See hoe replaced variable value looks like which has the file name of resultant

       
    Hope it helps !
    Thanks & Regards,
    Nived N 
    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs
     Found my answer helpful? Please consider marking it as the solution!
     Your appreciation keeps me motivated. Thank you!

     
  • HD-02081403-0 Profile Picture
    6 on at
    Thank you. I am using Power Automate online version. I think you are using the desktop version. I really appreciate your help and details.
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at
    Hi,
     
    Assuming the file format is always same -
     
    you can try this-
     
     
    Expression used- 
    concat(join(take(split(outputs('Compose'),'_'),3),'_'),'.',last(split(outputs('Compose'),'.')))
     
    Now see the result
     
     
     
    Thanks & Regards,
    Nived N 
    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs
     Found my answer helpful? Please consider marking it as the solution!
     Your appreciation keeps me motivated. Thank you!

     
     

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
11manish Profile Picture

11manish 298 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 289

#3
Henil Profile Picture

Henil 125

Last 30 days Overall leaderboard