How can move a document folder from one document library into another?

Is it possible to move a folder containing files from Document library A into document library B or do I have to manually download all interior files and importing into the new document library? If this is possible via powershell or sharepoint please provide guidance/commands or screenshots if possible. Thank you!

SharePoint Server A family of Microsoft on-premises document management and storage systems. 2,333 questions Sign in to follow SharePoint Server Development

SharePoint Server: A family of Microsoft on-premises document management and storage systems. Development: The process of researching, productizing, and refining new or existing technologies.

1,609 questions Sign in to follow SharePoint Server Management

SharePoint Server: A family of Microsoft on-premises document management and storage systems. Management: The act or process of organizing, handling, directing or controlling something.

2,936 questions Sign in to follow 0 comments No comments Report a concern I have the same question I have the same question 0 votes Add comment

2 answers

Sort by: Most helpful Most helpful Newest Oldest

Avinash Mamidi 95 Reputation points 2023-01-19T04:17:29.02+00:00

You can use Power Automate to complete this task. Please find the below URL for quick reference. [https://www.spguides.com/power-automate-copy-files/

1 comment Show comments for this answer Report a concern Tevon2.0 1,106 Reputation points 2023-01-19T14:26:35.15+00:00 I don't have access to office 365 as my company is utilizing SharePoint server 2019. 0 votes Report a concern Add comment Tong Zhang_MSFT 9,141 Reputation points 2023-01-19T06:30:54.8366667+00:00
  1. In the Choose a destination pane, select the new location where you want the folder to go, and then select Move here:

More information for reference: Move or copy files in SharePoint

Hope it can help you. Thanks for your understanding.

Please try to use the following PowerShell code to move a folder from Document library to another document library:

 Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue $url = "http://xxx/sites/SP2019/" $web = Get-SPWeb $url $list = $web.Lists["test_Library"] foreach($folder in $list.Folders) < if($folder.Name -eq "aaa") < $query = New-Object -Type 'Microsoft.SharePoint.SPQuery' $query.Folder = $folder.Folder $folderItems = $list.GetItems($query) foreach($item in $folderItems) < $file = $web.GetFile($item.Url) $targetPath = "library2/aaa/" + $file.Name $file.MoveTo($targetPath) >> > 

My test result:(Move the folder aaa in the test_library to Library2 , where the aaa folder contains a document)

(Note: You need to create an empty folder in the target library beforehand)

If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.