cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Andres506
New Member

Create a folder with a new name everytime I run the flow process

Hello, 

 

I am wondering if there is a way on Automate desktop which allows me to run the flow and create a folder with a diferent name everytime I run the flow.

 

Example:

Today I ran the flow process and it creates a folder named Reports followed by yesterdays date Reports 03102022, and I ran the same flow process tomorrow and creates a new folder named Reports 03112022.

 

I am very new at this but I can not find something similar to what I need.

 

If there is a similar post with the answer please let me know 🙂

2 REPLIES 2
MichaelAnnis
Super User
Super User

Get CurrentDateTime

add to datetime %CurrentDateTime% -1 day to %YEST%

convert datetime %YEST% to text custom format MMddyyyy to new variable  %YEST_mmddyyyy%. Be sure to use capital Ms on the custom format cuz lowercase stands for minutes. 

inside the flow you will want the following:

If folder doesn’t exist ‘%Path%\Reports %YEST_mmddyyyy%
    Create folder

EndIf

and then in your flow, you can save the reports to that folder using the same %Path%\Reports %YEST_mmddyyyy%

 

VJR
Super User
Super User

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (2,009)