echo %1 | find /i "htm"
if not Errorlevel 1 goto 4
goto end
:4
type %1 >1.htm
goto end
:end
参数%1为2.htm,运行结果如下
type "2.htm" 1>1.htm
The system cannot find the file specified.
后面多了一个1
if not Errorlevel 1 goto 4
goto end
:4
type %1 >1.htm
goto end
:end
参数%1为2.htm,运行结果如下
type "2.htm" 1>1.htm
The system cannot find the file specified.
后面多了一个1
