本帖最后由 lifei259 于 2017-11-28 15:45 编辑
- @echo off
- setlocal enabledelayedexpansion
- for /f "delims=" %%a in ('dir/a-d/b,*s.jpg') do (
- set "file=%%~na"
- set file=!file:s=!
- if !file! lss 100000 (
- echo,md "!file:~0,2!\!file!"
- echo,move "%%a" "!file:~0,2!\!file!"
- ) else (
- echo,md "!file:~0,3!\!file!"
- echo,move "%%a" "!file:~0,3!\!file!")
- )
- pause
复制代码 放在和图片一个文件夹,如果能用去掉echo, |