- @echo off&setlocal enabledelayedexpansion
- for /f "delims=" %%d in ('dir /b /ad') do (
- set "d="
- for /f "delims=" %%D in ('dir /b /s /ad "%%d"^|sort /r') do (
- if not defined d (
- set "d=%%D"
- move "%%d\*.*" "!d!" >nul 2>nul
- )else move "%%D\*.*" "!d!" >nul 2>nul
- )
- )
- pause
复制代码 回复 15# zhengzhenhui |