回复 16# k员外
将图片文件夹images和代码都放在文件夹“新华点二期”下,运行代码。未经测试,测试文件在家中电脑里,有问题再说:- @echo off
- setlocal enabledelayedexpansion
- set m=0
- for /l %%a in (1,1,21) do (
- if not %%a==6 if not %%a==19 set n=%%a
- for /d %%b in (!n!-*) do set /a m+=1&set _!m!=%%b
- )
- set x=0
- for /f "delims=" %%c in ('dir /b /a-d /od images\*.jpg') do (
- set /a x+=1
- set /a "y=(x-1)/2+1"
- for %%d in (_!y!) do copy "images\%%c" "!%%d!\"
- )
- pause
复制代码
|