我尝试使用 powershell 中的 SAS 链接从 blob 下载 zip 文件。我使用如上所述的确切语法 here但我收到以下错误
failed to perform copy command due to error: cannot use directory as source without --recursive or a trailing wildcard (/*)
下面是脚本
.\azcopy.exe copy '<SAS link to file>' '<local file path>'
我使用 AzCopy 版本 10.3.3
最佳答案
您的linking article包含使用Azure 文件的示例命令。但是,您提到您想从问题中的 blob 下载 zip 文件。
当我使用 blob 存储但使用 Azure 文件中的文件路径时,我可以重现此问题。请确保您的命令中没有任何拼写错误,尤其是 blob 存储 URL 和文件存储 URL。
如果您想从blob存储下载文件,请引用this .
语法
azcopy copy 'https://<storage-account-name>.<blob or dfs>.core.windows.net/<container-name>/<blob-path>?<SAS-token>' '<local-file-path>'
示例
azcopy copy 'https://mystorageaccount.blob.core.windows.net/mycontainer/myTextFile.txt?<SAS-token>' 'C:\myDirectory\myTextFile.txt'
示例(分层命名空间)
azcopy copy 'https://mystorageaccount.dfs.core.windows.net/mycontainer/myTextFile.txt?<SAS-token>' 'C:\myDirectory\myTextFile.txt'
关于azure - 使用 azcopy 从带有 SAS 链接的 blob 下载 zip 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59314596/