@echo off
Setlocal enabledelayedexpansion
set "sourcepath=C:\Users\Administrator\Desktop\TexturePackerTools"
for /f "skip=1 delims=:" %%a in ('^(echo "%sourcepath%"^&echo.^)^|findstr /o ".*"') do set /a length=%%a-5
for /r %sourcepath% %%s in (.) do (
set respath=%%s
set /a strlength=%length%+1
set resId=!respath:~!strlength!,4! echo !resId!
)
pause