本帖最后由 回家路上 于 2015-9-12 16:04 编辑
- @echo off
- :: 目标文件夹
- set dest=E:\描述图提取\
- :: 图片根目录,批处理所在文件夹,可修改
- set rootpath=%~dp0
- :: 要拷贝的文件夹
- set res=001,003,006,008,010
- :: 要排除的图片
- set exc=1,2,3,4,5,7,15,16
- for %%i in (%res%) do (
- pushd %rootpath%%%i\
- for /f "delims=" %%j in ('dir *.jpg /b /a-d') do (
- for %%a in (%exc%) do if "%%~nj" equ "%%a" set f=1
- if not defined f xcopy /y %%~fj %dest%%%i\
- set "f="
- )
- popd
- )
- pause & exit /b
复制代码
|