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 / Add date to folder name
Power Automate
Unanswered

Add date to folder name

(0) ShareShare
ReportReport
Posted on by 5

Hi,

 

I would like to add the date and time to folder name, for example:

 

FolderA in my document, I need to rename it as

FolderA 23-08-2021 12:37

 

Thank you 

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

    1. 'Get current date and time', retrieve Current date only
    2. 'Convert datetime to text', Format to use = Standard, Standard format = Short date
    3. 'Replace text': replace '/' with '-'
    3. 'Rename folder' 

  • Ishaq Profile Picture
    5 on at

    Yes, but this will completely the folder name, I want to keep the original name and add date and time to it.

    Original name: Folder A

    New name: Folder A 23-8-2021 12-45

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @Ishaq,

    Paste below code example to your PAD Flow Designer.

    DateTime.Local DateTimeFormat: DateTime.DateTimeFormat.DateAndTime CurrentDateTime=> CurrentDateTime
    Text.FromCustomDateTime DateTime: CurrentDateTime CustomFormat: $'''dd-MM-yyyy HH-mm''' Result=> FormattedDateTime
    Folder.Rename Folder: $'''C:\\Users\\UserName\\Downloads\\Folder A''' NewName: $'''C:\\Users\\UserName\\Downloads\\Folder A %FormattedDateTime%''' RenamedFolder=> RenamedFolder

     
    Thanks.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    So you have to retrieve the folder's name first. Use 'Get subfolders in folder' for example - this will give you a list of folders (%Folders%) from which you can select your folder (e.g. %Folders[0]%)

    Then, in the 'Rename folder' action, just add the date to the original name. For example: %Folders[0]% - %Replaced% (where Replaced is the date after replacing '/' with '-') 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 276 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 169

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard