實驗worked!!
記錄一下
set sourcePath=D:\A
set targetPath=D:\B
for /f "skip=1 delims=" %%x in ('wmic os get localdatetime') do if not defined X set X=%%x
set yyyyMMdd=%X:~0,8%
mkdir D:\B\%yyyyMMdd%
xcopy /F /Q /E /S %sourcePath% %targetPath%\%yyyyMMdd%
del /F /q "D:\A\*.*"
FOR /D %%p IN ("%sourcePath%\*.*") DO rmdir "%%p" /s /q