我想使用批处理文件打开保存在内部网团队场所的 Excel 文件。
我发现的问题是该文件的链接
使用%20作为间隔符,一旦批处理运行链接,它就会删除%2,并且链接不起作用:
答案1
原文链接可以直接从cmd
命令窗口工作(在进一步的特殊条件下),例如如下:
start "" iexplore https://teamplace.volvo.com/sites/3p-AusQuality/GTT%20Australia%20Quality%20Meeting/Document%20Library/1/QJ/QJ%201-4257722781%20Air%20compressor%20fitting%20leaks/Copy%20of%20QWB%20Air%20intake%20pipes%20testxlsx.xlsx
但是,%
在批处理脚本中,符号后跟密码具有特殊含义,请参阅call /?
或命令行参数(参数)。
使用空格代替%20
和将链接括在一对"
双引号中
start "" iexplore "https://teamplace.volvo.com/sites/3p-AusQuality/GTT Australia Quality Meeting/Document Library/1/QJ/QJ 1-4257722781 Air compressor fitting leaks/Copy of QWB Air intake pipes testxlsx.xlsx"
或者将所有%
标志翻倍以逃避其特殊含义并按字面意思如下:
start "" iexplore "https://teamplace.volvo.com/sites/3p-AusQuality/GTT%%20Australia%%20Quality%%20Meeting/Document%%20Library/1/QJ/QJ%%201-4257722781%%20Air%%20compressor%%20fitting%%20leaks/Copy%%20of%%20QWB%%20Air%%20intake%%20pipes%%20testxlsx.xlsx"