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

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

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard