批处理的FOR循环中如何打开带有特殊字符的网址?

来源:百度知道 编辑:UC知道 时间:2024/06/08 10:54:04
set /a count=27
set num=0
for /F "eol=: skip=4 tokens=1 delims=" %%i in (联盟互访.bat) do call :start %%i
21&different0320
20&different0320
19&different0320
19&klzm4562
20&klzm4562
21&klzm4562
21&deng88
20&deng88
19&deng88
21&liboylz
20&liboylz
19&liboylz
21&3huchch23
20&3huchch23
19&3huchch23
21&yuanhui200
20&yuanhui200
19&yuanhui200
21&wxjily749
20&wxjily749
19&wxjily749
21&a66b77
20&a66b77
19&a66b77
21&adumnd
20&adumnd
19&adumnd
:start
set /a num+=1
echo 访问第%num%个连接 http://www.4fhk.cn/cf.asp?%1 &start http://www.4fhk.cn/cf.asp?%1||echo 访问错误!!
set /a num1=%num%%%1
set /a num2=%num%%%10
if %num1%==0 echo. &echo 暂停一下!2秒后继续!&echo.&ping -n 2 127.1

不懂不懂

没人回答不要浪费分袄

测试了下,处理方法:

1.call :start %%i把后面的%%i用引号括起来,即call :start "%%i"
2.批处理从第4行开始的信息,所有&符号前面加一个转义字符^
3.后面的%1参数用%~1表示,即替换掉参数中的引号

你好!

批处理我没看太懂.

但我知道如果是特殊字符的问题,你应当在&前面加上^号就行了.

希望我的回答能够解决你的问题.