Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
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 

 

  • Sn3l Profile Picture
    on at
    Re: Copy Folder Structure Not files

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

  • Verified answer
    v-xiaochen-msft Profile Picture
    on at
    Re: Copy Folder Structure Not files

    Hi @Sn3l ,

     

    Please try this

    vxiaochenmsft_0-1715220767310.png

    FSObjType eq 1

    replace(items('Apply_to_each')?['{FullPath}'],'Shared Documents/','')
     
    Best Regards,
    Wearsky

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492