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

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

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

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard