- @echo off
- for /f "delims=" %%a in ('dir /s /b /ad') do (
- if exist "%%a\*.MP4" (
- md "%%~nxa" 2>nul
- copy "%%a\*.*" "%%~nxa\"
- ) else if exist "%%a\*.GIF" (
- md "%%~nxa" 2>nul
- copy "%%a\*.*" "%%~nxa\"
- )
- )
- for /f "delims=" %%a in ('dir /s /b /ad^|sort /r') do rd "%%a" 2>nul
复制代码 未测试 |