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 Platform Community / Forums / Power Automate / rename file using the ...
Power Automate
Answered

rename file using the same data in the filename to another format

(0) ShareShare
ReportReport
Posted on by 23

Hi Dear,

 

There is probably a similar thread to this, but I need someone to explain this to me in simple terms as I am a total beginner when it comes to this.

 

I'm developing an automation to extract files on the web. The problem is that the name appears in the following format "08-04-2021 06.01.00-DAY001 Report", I want to change the name after downloading it to Report_Day_20210804. Can you help me? I need to convert the date that appears in the name to 20210804 format

 

Regards

Valter

I have the same question (0)
  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    In simple terms you can do this:

    a) Retrieve the file's name

    b) Get the day, month and year as variables

    c) Concatenate day, month and year variables into the new name you want

    d) Rename the excel file.

     

    Considering you'll download your file to a specific folder, this flow will work (actions, key parameters):

    1. 'Get files in folder', Folder = where your file is. This will give you a %Files% variable

    2. 'Get subtext':

    • Original text = %Files[0].Name%
    • Start index = Start of text
    • Lenght = Num of chars
    • Number of chars = 2

    Rename the produced variable as %Month%

    3. 'Get subtext':

    • Original text = %Files[0].Name%
    • Start index =Character position
    • Character position = 3
    • Lenght = num of chars
    • Num of chars = 2

    Rename the produced variable as %Day%

    4. 'Get subtext':

    • Original text = %Files[0].Name%
    • Start index =Character position
    • Character position = 6
    • Lenght = num of chars
    • Num of chars = 2

    Rename the produced variable as %Year%

    5. 'Set variable', Define = Newname, To = Report_Day_%Year%%Month%%Day%

    6. 'Rename file':

    • File to rename = %Files[0]%
    • Rename scheme = Set new name
    • New file name = %NewName%
    • Keep extension = activated
  • Chaile90 Profile Picture
    23 on at

    You are a genius @Anonymous 

     

    Many thanks for help. Working perfect...

     

    Best wishes and a good weekend 🙂

    Valter

     

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 791

#2
Valantis Profile Picture

Valantis 568

#3
Haque Profile Picture

Haque 535

Last 30 days Overall leaderboard