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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Copy file from SharePo...
Power Automate
Unanswered

Copy file from SharePoint 2013 to online using on-premises data gateway in power automate

(1) ShareShare
ReportReport
Posted on by 4

I need to copy files along with folders from SharePoint 201 to online. For this, created a on-premises data gateway connection. Used "Get files (properties only)" action in power automate (with the connection of on-premise SharePoint site. Site address and library are given). Then used "Apply to each" action to loop through files and folders. In this action "items('Apply_to_each')?['{Path}']" is empty. Hence unable to get the file content and create file under the folder path. Need to maintain the folder structure.

Suggestions please!

Categories:
I have the same question (0)
  • trice602 Profile Picture
    15,402 Super User 2025 Season 2 on at

    Hi @neenadani ,

     

    Here's some framework for you to consider and I think it will achieve what you are looking for.  The key here, as you described, is you must maintain folder structure and you can do that with a conditional step.  If the folder exists, you are simply creating files.

     

    If the folder doesn't exist, you are creating the folder and files, if the folder exists, you only create the folders.

     

    trice602_1-1692555324400.png

     

     

     

  • neenadani Profile Picture
    4 on at

    Thank you much for the reply!
    After getting file properties using the action "Get files (properties only)" from on-premise SharePoint site library. In the loop, "items('Apply_to_each')?['{Path}']" is empty. Not getting the folder path. This is the issue.

    neenadani_0-1692607972967.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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard