cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Posiden
Level: Powered On

get all current file on Onedrive Business and copy to Onedrive

I want to build a flow will copy all files on Onedrive Business folder to Onedrive folder (diferrent account). 

 First i list all file in my folder on OneDrive Business

pic1.png

Then i do with each things i get

pic2.png

If no, mean this is a file, i get content and create file in my OneDrive account

replace(item()?['Path'],last(split(item()?['Path'],'/')),'')

pic3.png

But when i run it failedpic4.png Please some one explain for me. i think it can not get value for condition from loop.

Here is a part of my output in "List files in folder" step

{
"Id": "b!Tvv8dra7OUe2bOLw3-8XSeQpomCkq0ZItEFmMAu3GArKm1WnZ6q5T4MSuic9dW_D.015CM3TWTJ5TOYYF535NE3ZIHHT57N23VY",
"Name": "999DoaHoaHong-LyHai_37umm.mp3",
"NameNoExt": "999DoaHoaHong-LyHai_37umm",
"DisplayName": "999DoaHoaHong-LyHai_37umm.mp3",
"Path": "/drives/b!Tvv8dra7OUe2bOLw3-8XSeQpomCkq0ZItEFmMAu3GArKm1WnZ6q5T4MSuic9dW_D/root:/00.Personal/08.Musics/999DoaHoaHong-LyHai_37umm.mp3",
"LastModified": "2018-10-23T15:20:32Z",
"Size": 3923962,
"MediaType": "audio/mpeg",
"IsFolder": false,
"ETag": "\"{8CDDEC69-BB17-49EB-BCA0-E79F7EDD6EB8},2\"",
"FileLocator": "b!Tvv8dra7OUe2bOLw3-8XSeQpomCkq0ZItEFmMAu3GArKm1WnZ6q5T4MSuic9dW_D.015CM3TWTJ5TOYYF535NE3ZIHHT57N23VY",
"LastModifiedBy": "Hoang, Nguyen Minh"
},

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Posiden
Level: Powered On

Re: get all current file on Onedrive Business and copy to Onedrive

Dear @AlanPs1 ,

Thank you very much. i have done some modify on my flow, and now it work as i expected.

Please review it

2019-04-09_11-15-09.png2019-04-09_11-17-16.png

Next step i will looking for how to recall this flow for all sub-folder. 

Thanks for help

View solution in original post

5 REPLIES 5
Super User
Super User

Re: get all current file on Onedrive Business and copy to Onedrive

Hi @Posiden 

I have recreated this and the condition is working for me, please see below:

condtion equalling true & false both working as expected and Flow runs successfuly at this stage.Capture-449.png

 

Capture-450.png

 

So, I have recraeted this and the problem looks to be at your path. I have used:

replace(items('Apply_to_each')?['Path'],last(split(items('Apply_to_each')?['Path'],'/')),'')

I get the following error which is in line with yours:Capture-453.png

So, it looks to not like your path.

If I set a simple path format such as "Test":Capture-454.png

 

It works!

Note: You can only get 20 files using "List files in folder" also.

 

If you have found my post helpful, please mark thumbs up.

 

Any other questions, just ask.

 

Thanks, Alan


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Posiden
Level: Powered On

Re: get all current file on Onedrive Business and copy to Onedrive

Hi Alan,
Thanks for answer me.
My flow error right when checking is folder or not, as my screenshot.
But i will try re-build my flow without any action in yes and no path.
Anyway, i need to re-create the structure of folder in Source folder so it is dynamic path right?
Any recommendation for me?
Posiden
Level: Powered On

Re: get all current file on Onedrive Business and copy to Onedrive

Dear Alan, 

As your instruction, i used a fixed destination folder and it worked. but i  really want to dynamic destionation folder with same name on source folder. Can you help me?

Posiden
Level: Powered On

Re: get all current file on Onedrive Business and copy to Onedrive

Dear @AlanPs1 ,

Thank you very much. i have done some modify on my flow, and now it work as i expected.

Please review it

2019-04-09_11-15-09.png2019-04-09_11-17-16.png

Next step i will looking for how to recall this flow for all sub-folder. 

Thanks for help

View solution in original post

Highlighted
Johnh1
Level: Powered On

Re: get all current file on Onedrive Business and copy to Onedrive

Hello,

 

Trying to recreate this flow to convert word/excel files to PDF files.  In your solution you have a Condition inside the Apply to each process.  For the Condition you have (onedirve) Is folder? -> 'is equal to' -> fx true.  When I try to select true from the functions I do not see it.  What am i missing?

Regards,

John

 


Condition under Appy to each.jpgDo not see the function true in the drop down.

 

 

 

 

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,335)