- @echo off & setlocal enabledelayedexpansion
- REM pushd c:\测试目录
- for /d %%i in (*) do (
- set n=%%~dpni
- for /f "usebackq tokens=* delims=" %%a in (`dir /a-d /b /s "%%i"`) do (
- set /a s+=1
- set m=%%a
- )
- if !s! equ 1 (
- move "!m!" "!n!\.."
- rd "!n!"
- )
- set s=0
- pause
- )
复制代码
|