robocopy a specific directory and its contents but not the files on the same directory-depth
I don't know powershell very well but I can do a batch file that can do it.
The only thing you have to change is the Source and Destiny variables:
Set Source=%userprofile%\desktop\Source
Set Destiny=%userprofile%\desktop\Destiny
Updated...31/07/2021
@echo off
:: Copy the contents of folders called "!Downloads" in the Source only
chcp 65001 > nul
Set Source=%userprofile%\desktop\Source
Set Destiny=%userprofile%\desktop\Destiny
Set "SWord=!Downloads"
if /i not "%Source:~-1%"=="\" set "Source=%Source%\"
if /i not "%Destiny:~-1%"=="\" set "Destiny=%Destiny%\"
pushd "%Source%"
for /f "Delims=" %%a in ('dir /s /ad /b *%SWord%*') do (
call :CopyFiles "%%~Fa"
)
exit
:CopyFiles
set "Folder=%~1"
Call set "Folder=%%Folder:%Source%=%%"
xcopy "%Folder%" "%Destiny%%Folder%\" /h /s /r /y /i /q
goto :EOF