本帖最后由 qixiaobin0715 于 2021-4-17 15:35 编辑
回复 23# ypzdy - @echo off
- setlocal enabledelayedexpansion
- for %%i in (*.jpg) do (
- set str=%%~ni
- echo,!str:~0,1!|findstr [0-9]>nul||(
- set str1=%%~ni
- for /l %%j in (0,1,9) do set str1=!str1:%%j= !
- for /f %%k in ("!str1!") do set str=!str:%%k=!
- )
- ren "%%i" "!str!^&出库单^&!str!库单.jpg"
- )
- pause
复制代码
|