I need to move a lot of sub-folders. Each client has this structure and needs to be modified
The only folder I need to move is the "Correspondence" folders with all its contents. It needs to come "up" one level to the same level as the "2022" folder
The current folder structure looks like this:
Clients
........Surname,Initials
................................2022, Prior Years
.................................................................2018
.................................................................2019
.................................................................2020
.................................................................2021
.................................................................Calculations
.................................................................Correspondence
and this is what I need
Clients
===>Surname,Initials
===>2022, Correspondence, Prior Years
.......................................................................2018
.......................................................................2019
.......................................................................2020
.......................................................................2021
.......................................................................Calculations
This is what I have tried
dir -Directory | % {Push-Location $_.FullName; dir './Correspondence' | % {Move-Item $_.FullName} but that didn't work and resulted in errors
dir -Directory | % {Push-Location $_.FullName; dir './Correspondence' | % {Move-Item $_.FullName} That also resulted in errors