我如何在批處理文件中(或從Windows命令行)轉(zhuǎn)義“&”符號,以便使用該start命令打開URL中帶有“&”符號的網(wǎng)頁?雙引號不能使用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將導(dǎo)致http://www.google.com/search?client=opera 在默認瀏覽器中打開,并且在命令行窗口中出現(xiàn)以下錯誤:'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。
如何在批處理文件中轉(zhuǎn)出“&”號?
明月笑刀無情
2019-10-18 13:59:47