web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to copy all folder...
Power Automate
Unanswered

How to copy all folders and files from Sharepoint to onedrive (Personal)?

(0) ShareShare
ReportReport
Posted on by 7

I am trying to create a flow to back up all the data of students to their personal accounts on a certain date. I have managed to connect the personal account, however. I am having trouble copying the data. I have found ways to copy the newly created file, but existing ones I couldn't do it.

Many thanks

Categories:
I have the same question (0)
  • efialttes Profile Picture
    14,756 on at

    Hi!

    Can you share a screenshot from your current flow design?

    I also assume you plan to share the flow with all your students, so each of them will import and run the flow with their own credentials.

    I mean, I do not see any other way to reach One Drive (personal) from a student unless the flow runs with student own credentials

    Thanx!

  • OussD Profile Picture
    7 on at

    I cannot share the current state of the flow (I am not authorized).

     

    We are not going to share the flow with students, we are going to make it automatic to those who subscribe. They do not (and probably cannot) edit or see the flow.

     

    This is the flow I found for copying files, but it is only for newly created ones:

    https://france.flow.microsoft.com/en-us/galleries/public/templates/0309ed62451b4421a226e1da06ce670a/copy-newly-added-files-from-a-sharepoint-library-to-onedrive/

     

  • efialttes Profile Picture
    14,756 on at

    Hi!

    Since you cannot share your current flow for confidentiality reasons, I need to understand better the problem

    This is the template you are suggesting to use

    Flow_BackUpOneDrive.png

    But, how do you match files per student? Do all share the same folder, each student grant to the ones he/she uploaded only?

    Thanx!

     

     

     

  • OussD Profile Picture
    7 on at

    Thank you for your answer. 

    The matching is done by connecting only one Onedrive account per student (or google drive, but that's another story), and in that Onedrive, there is a folder for backups called UNINAME_Backup (We create the flow and add it to their student account).

     

    I have tested the flow with the newly created files, and it works. But I am able to copy the files that were already there before the creation of the flow.

  • efialttes Profile Picture
    14,756 on at

    Hi again!

    The point is, the flow you are working with triggers when a new file is created.

    In order to perform a backup of current student files stored in Sharepoint, you need a manually triggered flow, that reads all files belonging to the student by means of 'Get files (properties only)' then do an 'Apply to each' to iterate all through the student current files in Sharepoint, and copy each file to student's onedrive.

    The concept is explained here with flow design screenshots:

    https://joannecklein.com/2018/01/02/a-modern-transfer-to-another-location-in-office-365/

    The differece is inside Apply to Each:

    instead 'moving' files from one SP libreary to another folder + deleting original file; your 'copy' steps are exactly the same as the ones you have in your current flow.

     

    This second flow is easy to implement, but we need to understand which files in SP belong to current student, something still unclear to me... 'Gt files (properties only)' will provide all files stored in the library, so ... which are the ones in SP belonging to a particular student? Are they stored in one subfolder per student? Shall I rely on 'Created by' column metadata instead?

    Hope his helps

  • OussD Profile Picture
    7 on at

    Thank you again for your answer, I think this will do great. I have only one problem though, the get files is not returning anything ...

    I have setup this : tempsnip.png

     And it return this error :

     tempsnip2.png

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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 304

#2
David_MA Profile Picture

David_MA 245 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 243 Most Valuable Professional

Last 30 days Overall leaderboard