回复 1# 5i365
来个纯批的吧:- @echo off
- set n=10000
- setlocal enabledelayedexpansion
- for /f "tokens=1*" %%i in ('dir /b /ad A') do (
- set /a n+=%%i
- set "_!n!=%%i %%j"
- set n=10000
- )
- for /f "delims=" %%k in ('dir /b /ad B') do (
- if exist "B\%%k\ok" (
- pushd "B\%%k"
- dir /b /ad|find /v "ok">nul||(
- set /a m+=1
- set "#!m!=B\%%k"
- )
- popd
- )
- )
- for /f "tokens=1* delims==" %%a in ('set _') do (
- set str=%%b
- set /a x+=1
- set /a "y=(x+1)/2"
- for /f "delims=" %%c in ("#!y!") do if exist "!%%c!" move "A\%%b" "!%%c!\"
- )>nul
- if not exist "A\!str!" echo,文件夹已经分完!!!
- pause
复制代码
|