Announcements
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
1. 'Get current date and time', retrieve Current date only2. 'Convert datetime to text', Format to use = Standard, Standard format = Short date3. 'Replace text': replace '/' with '-'3. 'Rename folder'
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
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.
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
David_MA 276 Super User 2026 Season 1
11manish 169
Haque 154