@echo off&setlocal enabledelayedexpansion
rem csv文件路径(绝对路径)
set "csv=C:\Users\Administrator.SD-20200130HORC\Desktop\1.csv"
rem 设置jpg文件夹得路径(绝对路径)
set "jpg=C:\Users\Administrator.SD-20200130HORC\Desktop\1"
cd /d %jpg%
(for /f "tokens=1,2 delims=," %%i in (%csv%) do (
for /f "tokens=1,2,3 delims=-." %%a in ('dir /b /a-d *.jpg^| find "%%j"') do (
ren "%%a-%%b.%%c" "%%i.%%c" >nul
)
))&pause