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 - Building Flows
Suggested answer

How to automatically rename a file with YYYY-MM_Monitoring-Sheet

(0) ShareShare
ReportReport
Posted on by 30
Hello, 
 
I am creating a copy of an Excel file every 3 months and running a script on the Excel file. The flow works, but I would like the newly created file to feature the Year and month at the start of the file name. Ideally I want the new name to be yyyy-MM_Monitoring-Sheet. Currently, the new file is named with the original file's name and adds 1 or 2 or 3 at the end. Here's how the flow looks now. Can you please help? Thanks!
 
I have the same question (0)
  • Cgangweg01 Profile Picture
    575 Super User 2025 Season 2 on at
    How to automatically rename a file with YYYY-MM_Monitoring-Sheet
    Hello CheriV,
     
    Not sure if this is exactly what you are after but maybe.
     
    In this flow I get the Current time, pass that output to the Convert time zone action to get the date time format I want and then use that output in a Compose to construct the file name. The output of the compose can be used in your file naming action.
  • CheriV Profile Picture
    30 on at
    How to automatically rename a file with YYYY-MM_Monitoring-Sheet
    Hi Cgangaweg01, I am unsure how this will fit in to my current flow. Can you clarify?
  • Suggested answer
    David_MA Profile Picture
    12,515 Super User 2025 Season 2 on at
    How to automatically rename a file with YYYY-MM_Monitoring-Sheet
    If you just need to make a copy of a spreadsheet with a new name, do this:
    1. Use the Get file content action and point it to the spreadsheet.
    2. Add a Compose action and use an expression such as concat(formatDateTime(utcNow(),'yyyy-MM'),'_Monitoring-Sheet.xlsx') to generate the file name.
    3. Add a Create file action and use the file content from the Get file content action in the File Content field and use the output of the Compose action for the filename.
    4. Then run your script on the new file.

  • CheriV Profile Picture
    30 on at
    How to automatically rename a file with YYYY-MM_Monitoring-Sheet
    Hello, David MA,
     
    It seems I do not have a Compose Filename action. See screenshot below. Is that because the file I am trying to copy is in SharePoint? The copied file will also be saved in SharePoint.
     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

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

#2
Tomac Profile Picture

Tomac 452 Moderator

#3
developerAJ Profile Picture

developerAJ 302

Last 30 days Overall leaderboard