cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Posiden
Regular Visitor

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

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
AlanPs1
Resident Rockstar
Resident Rockstar

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!


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?

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?

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

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

 


Do not see the function true in the drop down.Do not see the function true in the drop down.

 

 

 

 

Helpful resources

Announcements
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.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (3,056)