
@璐村惂鐢ㄦ埛_000076K馃惥 off&title 提取指定文件夹中的前两张与最后一张图片
setlocal EnableDelayedExpansion
set lines=0
set "Path_d=%~dp0\test"
for /f "delims=" %%i in ('dir /a /b %Path_d%') do (
set /a lines+=1
if !lines! equ 1 echo;%%i
if !lines! equ 2 echo;%%i
)
for /f "delims=" %%i in ('dir /a /b /o-d %Path_d%') do (
echo;%%i
pause >nul&exit
)
自己测试过的,没问题