@echo off
set source_path=D:\www.img.com\chrysler
set dest_path=D:\www.img.com\chrysler_png
set vcffile=*.png
d:
cd %source_path%
for /f "delims=" %%s in ('dir /b/a-d/s "%source_path%"\"%vcffile%"') do (
echo %%s
copy /y "%%s" %dest_path%
)
pause
source_path是指从哪里复制,dest_path是指复制到哪里去。
上面的代码目标是:把D:\www.img.com\chrysler的所有png格式的文件复制到D:\www.img.com\chrysler_png去