【发布时间】:2015-01-08 13:35:27
【问题描述】:
任务是用 html 文件集合中的一些新路径替换引用路径。我为此使用了下面的代码,它抛出了最大 setlocal 递归级别达到错误,
@echo off
for /r ".\" %%f in (\html\*.htm) do (
SETLOCAL
call :SUB ../icons ../../icons "%%f">"%%f_new"
del "%%f"
)
for /r ".\" %%f in (*.htm_new) do rename "%%f" "*.htm"
ENDLOCAL
exit /b
:SUB
call
if "%~1"=="" findstr "^::" "%~f0"&GOTO:EOF
for /f "tokens=1,* delims=]" %%A in ('"type %3|find /n /v """') do (
set "line=%%B"
call set "line=echo.%%line:%~1=%~2%%"
for /f "delims=" %%X in ('"echo."%%line%%""') do %%~X
)
exit /b
谁能告诉我如何解决这个错误?
提前谢谢..
【问题讨论】:
标签: batch-file