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

Community site session details

Session Id :
Power Automate - Power Automate Desktop
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
Categories:
I have the same question (0)
  • Suggested answer
    Nived_Nambiar Profile Picture
    on at
    Renaming Files
    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
    Renaming Files
    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,029 Super User 2025 Season 2 on at
    Renaming Files
    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

Coming soon: forum hierarchy changes

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

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 535 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 348 Moderator

#3
developerAJ Profile Picture

developerAJ 262

Last 30 days Overall leaderboard