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 / Moving document and fo...
Power Automate
Answered

Moving document and folders within document library across any levels

(0) ShareShare
ReportReport
Posted on by 4

Hi All,

 

I have a requirement to copy documents and folders/subfolders across any levels within a document library.

Have a JSON variable source and destination. Destination path usually doesn't exist, hence using Create New folder action to create that path first. 

 

Issue I am facing is documents/folders gets copied successfully to the destination, however nested folders/files come outside and gets copied in parent folder as well. Any idea where I m going wrong? Below is my flow screenshot.

 

Kumarrl2022_2-1669305928474.png

 

 

Kumarrl2022_1-1669305834207.png

 

 

 

 

Categories:
  • Verified answer
    v-chengfen-msft Profile Picture
    Microsoft Employee on at

    Hi @Kumarrl2022 ,

    Could you please tell me:
    1. Which Action did the first Full path get from?
    If it is obtained from [Get files (properties only)], the full path of the file should be obtained.

     

    Do you want to move a certain folder to the newly created folder?
    Here is a test for your reference:

    Here are the folders and files that need to be moved:

    vchengfenmsft_0-1669347528526.png

    This is the parent folder of the target folder:

    vchengfenmsft_1-1669347621471.png

    Here is flow:

    I assume you are using the path of [Get files (properties only)], it is recommended to use Folder path here.
    The contents of the Folder path cannot be used to populate, we need to make some modifications.

    slice(items('Apply_to_each_2')?['{Path}'],0,-1)

    vchengfenmsft_2-1669347637203.png

    vchengfenmsft_3-1669347646191.png

    Here is result:

    vchengfenmsft_4-1669347670919.png

    Best Regards

    Cheng Feng

     

     

     

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 377

#2
11manish Profile Picture

11manish 292 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 128

Last 30 days Overall leaderboard