Код:
@echo off
set "papka=C:\folder\"
setlocal
:loop_len
if not "%papka%"=="" (
set papka=%papka:~1%
set /a n+=1
goto loop_len
)
endlocal & set n=%n%
for /f "tokens=*" %%i in ('dir /b /s "%papka%"') do (
set find_adr=%%i
call echo %%find_adr:~%n%%%
)
pause
Альтернативный вариант:
Код:
@echo off
set "papka=C:\folder\"
for /f "delims=" %%i in ('dir /b /s "%papka%"') do (
set find_adr=%%i
call echo %%find_adr:%papka%=%%
)
pause