I have the below code working.
$sourceContainer = "/sitecore/content/folder/Home/Topics/To";
$destinationContainer = "/sitecore/content/folder/Home/Topics/From";
Get-ChildItem $sourceContainer | ForEach-Object {
Move-Item -Path $_.ItemPath -Destination $destinationContainer;
}
It carries over all the folders and files in them but will duplicate the folders vs. 1 folder with all the file that pertain to the folders. I am a PShell newbie as in first time today lol.
Given this structure:
Topics
-From
--Data
---2019
----05
-----Page-F
---2020
----04
-----Page
----06
-----Page
-To
--Data
---2019
----05
-----Page-T
---2020
----07
-----Page
----09
-----Page
Combine outcome that I want:
Topics
-To
--Data
---2019
----05
-----Page-T
-----Page-F
---2020
----04
-----Page
----06
-----Page
----07
-----Page
----09
-----Page