@echo off
setlocal enabledelayedexpansion
for /f "delims=" %%a in ('dir /a-d/b/s *.jpg') do (
set file_size=%%~zdza
if !file_size! lss 20 (
md "E:%%~pa"
copy %%~fsa "E:%%~pa"
)
)>nul 2>nul
echo end...
pause
-------------------------------------
将bat放到指定的路径下执行(本地是在D盘),然后会在E盘生成 小于20KB,相同路径储存的文件