cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

copy an excel file to a different folder in the same onedrive (business account) and add a date to a the file name when creating it power automate

hi, 
I just discovered the power automate tool and made some use of it.

In fact, I built a flow that convert an excel file to PDF and send it by email every 24 hours, and the issue is that I want to archive (make a copy) of the original excel file to a different folder (let's say archive folder) with adding a date for each file before sending the mail,


thank you,

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Anonymous 

 

Thank you for your explanation. Sorry for misunderstanding.

 

Your just want to copy the excel file "C&S daily report" in the "RJ C&S" folder adding the date in its name, at the same time convert the copied file to PDF (not the original) and send it email.

 

I simplified the flow.

 

Please take a try again with the following steps:

v-duann-msft_0-1620352940699.png

 

Expression: formatDateTime(utcNow(),'yyyy-MM-dd')

v-duann-msft_1-1620352940710.png

 

This is my test folder

v-duann-msft_2-1620352940713.png

This is my RJ C&S folder before flow runs, It's empty.

v-duann-msft_3-1620352940713.png

After the flow runs, C&S daily report can be copied to RJ C&S folder with date. 

v-duann-msft_4-1620352940714.png

 

And can receive an email as below.

v-duann-msft_5-1620352940715.png

 

Hope the content above can help you.

 

Best Regards

Anna

View solution in original post

5 REPLIES 5
v-duann-msft
Community Support
Community Support

Hi @Anonymous

 

According to your description,  you want to copy the original excel file to a different folder with adding a date for each file before sending the mail.

 

Please take a try with the following steps:

Expression: formatDateTime(utcNow(),'yyyy-MM-dd')
test123: Source folder

copy: Destination folder

v-duann-msft_0-1620197563649.png

 

v-duann-msft_1-1620197563653.png

 

v-duann-msft_2-1620197563656.png

 

v-duann-msft_3-1620197563659.png

 

This is my original folder

v-duann-msft_4-1620197563661.png

This is my destination folder after flow runs.

v-duann-msft_5-1620197563662.png

This is the email I received after flow runs

v-duann-msft_6-1620197563664.png

Hope the content above can help you.

 

Best Regards

Anna

Anonymous
Not applicable

@v-duann-msft  thank you for your quick response, but I think I didn't express myself clearly,

here is the process to automate;

let's say I have two folders in the same Onerive business account, "test", and "RJ C&S" (which is not in the root),

and I have several files (excel and pdf) in the "test" folder, where I share an excel workbook for multiple editing, whose name is "C&S daily report"

At the end of the day, I want to copy the excel file "C&S daily report" in the "RJ C&S" folder adding the date in its name, at the same time (or one step further) convert the copied file to PDF (not the original, I think that it will be easier like that) and send it by e-mail ‌‌😁


I don't know if I am clear because my English is not very good ‌‌😐


thanks for taking the time to help me @Anna 🙏

Hi @Anonymous 

 

Thank you for your explanation. Sorry for misunderstanding.

 

Your just want to copy the excel file "C&S daily report" in the "RJ C&S" folder adding the date in its name, at the same time convert the copied file to PDF (not the original) and send it email.

 

I simplified the flow.

 

Please take a try again with the following steps:

v-duann-msft_0-1620352940699.png

 

Expression: formatDateTime(utcNow(),'yyyy-MM-dd')

v-duann-msft_1-1620352940710.png

 

This is my test folder

v-duann-msft_2-1620352940713.png

This is my RJ C&S folder before flow runs, It's empty.

v-duann-msft_3-1620352940713.png

After the flow runs, C&S daily report can be copied to RJ C&S folder with date. 

v-duann-msft_4-1620352940714.png

 

And can receive an email as below.

v-duann-msft_5-1620352940715.png

 

Hope the content above can help you.

 

Best Regards

Anna

Anonymous
Not applicable

Hi @v-duann-msft 

Thank you very much 🙏 ! it worked well,

I think I will probably come back to you for some other questions 🤗

 

Best Regards,

Masnsen,

Anonymous
Not applicable

Hi, i tried this method but only yo duplicate and rename files in excel but it output is the copied file is not in excel format. Really need your help on this

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,230)