回复 1# SandraRusso
测试前先备份原文件夹- @echo off
- cd /d "F:\W\"
- for /f %%a in ('dir /ad /b') do (
- pushd "%%a"
- for /f %%b in ('dir /ad /b') do (
- pushd "%%b"
- for /f %%i in ('dir /a-d /b') do (
- move "%%i" "./.."
- )
- popd
- rd "%%b\" /s /q 2>nul
- echo 已删除“%%b”文件夹
- )
- popd
- )
- pause
复制代码
|