发布网友 发布时间:2024-10-18 04:50
共1个回答
热心网友 时间:2024-11-08 01:10
@echo off
dir /ad /b >tempdir.txt
for /f "delims=" %%a in ('dir /ad /b') do (
for /f "delims=" %%b in ('dir /ad /b "%%a\*"') do (
if not exist "%%b" md "%%b"
move "%%a\%%b\*" "%%b\"
rd "%%a\%%b"
)
)
for /f "delims=" %%a in (tempdir.txt) do rd "%%a"
del tempdir.txt
pause