亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何在批處理文件中轉出“&”號?

如何在批處理文件中轉出“&”號?

明月笑刀無情 2019-10-18 13:59:47
我如何在批處理文件中(或從Windows命令行)轉義“&”符號,以便使用該start命令打開URL中帶有“&”符號的網頁?雙引號不能使用start; 這將啟動一個新的命令行窗口。更新1:Wael Dalloul的解決方案有效。另外,如果URL中有URL編碼的字符(例如,空格編碼為%20)并且在批處理文件中,則必須將“%”編碼為“ %%”。在示例中不是這種情況。例如,從命令行(CMD.EXE):start http://www.google.com/search?client=opera&rls=en&q=escape+ampersand&sourceid=opera&ie=utf-8&oe=utf-8將導致http://www.google.com/search?client=opera 在默認瀏覽器中打開,并且在命令行窗口中出現以下錯誤:'rls' is not recognized as an internal or external command,operable program or batch file.'q' is not recognized as an internal or external command,operable program or batch file.'sourceid' is not recognized as an internal or external command,operable program or batch file.'ie' is not recognized as an internal or external command,operable program or batch file.'oe' is not recognized as an internal or external command,operable program or batch file.平臺:Windows XP 64位SP2。
查看完整描述

3 回答

?
呼啦一陣風

TA貢獻1802條經驗 獲得超6個贊

&用于分隔命令。因此,您可以使用^來逃脫&


查看完整回答
反對 回復 2019-10-18
  • 3 回答
  • 0 關注
  • 689 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號