本帖最后由 qixiaobin0715 于 2021-12-18 20:55 编辑
批处理也能干这事:- @echo off
- setlocal enabledelayedexpansion
- for /d %%a in (2\*) do (
- set /a x+=1
- set #!x!=%%a
- )
- for /d %%b in (1\*) do set /a y+=1
- set /a n=y/x
- set /a m=y%%x
- if !m! neq 0 set /a n+=1
- for /d %%c in (1\*) do (
- set /a k+=1
- set /a l=(k-1^)/n+1
- for %%d in (#!l!) do (
- if not exist "!%%d!\%%~nxc" (
- md "!%%d!\%%~nxc"
- xcopy "%%c\*.*" "!%%d!\%%~nxc\" /s>nul
- )
- )
- )
- pause
复制代码
|