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 / Copy Folder Structure ...
Power Automate
Answered

Copy Folder Structure Not files

(0) ShareShare
ReportReport
Posted on by

Good Morning, 

 

I am trying to copy a folder structure of all Folders under a the Document Document Library to another Site 

 

I have found a few PowerShell scripts that can do this but connecting via the CSOM - and unable to Authenticate in our environment

 

I have seen a few flows to copy whole directories but includes all the content.   Any help with any previously posted articles or guidance would be appreciated.  

 

 

Thank you 

 

Categories:
I have the same question (0)
  • Verified answer
    v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @Sn3l ,

     

    Please try this

    vxiaochenmsft_0-1715220767310.png

    FSObjType eq 1

    replace(items('Apply_to_each')?['{FullPath}'],'Shared Documents/','')
     
    Best Regards,
    Wearsky
  • Sn3l Profile Picture
    on at

    @v-xiaochen-msft  This worked perfectly.  Thank you very much. 

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 474

#2
11manish Profile Picture

11manish 268

#3
David_MA Profile Picture

David_MA 243 Super User 2026 Season 1

Last 30 days Overall leaderboard