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
I have the same question (0)
  • Suggested answer
    Nived_Nambiar Profile Picture
    Microsoft Employee 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 816

#2
Valantis Profile Picture

Valantis 603

#3
Haque Profile Picture

Haque 566

Last 30 days Overall leaderboard