这段代码为什么不起作用?
:downloadPicture
bitsadmin /transfer downloadPicture /download /priority normal https://www.planwallpaper.com/static/images/foggygoldengatebridge.jpg C:\Users\%username%\desktop\%pictureName%
它给我一个错误,说服务器不支持必要的 HTTP 协议。谢谢!顺便说一句,这只是项目的一部分。我把它设置pictureName
在其他地方。
答案1
完整信息如下:
DISPLAY: downloadPicture TYPE: DOWNLOAD STATE: ERROR
PRIORITY: NORMAL FILES: 0 / 1 BYTES: 0 / 17873 (0%)
Unable to complete transfer.
ERROR FILE: https://www.planwallpaper.com/static/images/foggygoldengatebridge.jpg -> C:\Users\ouroborus\desktop\%pictureName%
ERROR CODE: 0x80200013 - The server does not support the necessary HTTP protocol. Background Intelligent Transfer Service (BITS) requires that the server support the Range protocol header.
ERROR CONTEXT: 0x00000005 - The error occurred while the remote file was being processed.
发生的事情非常清楚:bitsadmin
要求服务器支持Range
标头,而 planwallpaper.com 并不提供该支持。