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

Community site session details

Session Id : nOCk0dPU+whhkUoMHWPtMa
Power Automate - Building Flows
Answered

Copy Folder Structure Not files

Like (0) ShareShare
ReportReport
Posted on 9 May 2024 01:27:05 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 20 May 2024 at 02:25:17
    Re: Copy Folder Structure Not files

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

  • Verified answer
    v-xiaochen-msft Profile Picture
    on 09 May 2024 at 02:13:32
    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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2