You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure存储容器(门户端)如何上传含子文件夹的完整文件夹?

上传包含子文件夹的完整文件夹到Azure存储容器(免费层)

Azure门户(portal.azure.com)本身没有直接上传整个文件夹的选项,你可以用以下几种方法实现完整文件夹(含子文件夹)的上传,免费层账户完全支持:

方法1:Azure存储资源管理器(推荐)

  • 下载安装Azure存储资源管理器,用你的Azure账号登录
  • 找到目标存储容器,右键选择上传 > 上传文件夹
  • 选中本地要上传的文件夹,确认后即可完整保留文件夹层级结构上传

方法2:Azure CLI命令

  • 先在本地终端(Windows命令提示符/PowerShell、macOS/Linux终端)安装Azure CLI,执行az login登录你的Azure账号
  • 运行以下命令替换参数后执行:
    az storage blob upload-batch --source "/本地文件夹的绝对路径" --destination "你的容器名称" --account-name "你的存储账户名称"
    

方法3:PowerShell脚本

  • 打开PowerShell,执行Connect-AzAccount登录Azure账号
  • 替换脚本中的参数后运行:
    $localFolderPath = "C:\本地文件夹路径" # 替换为你的本地文件夹绝对路径
    $targetContainer = "目标容器名称"
    $storageAccount = "你的存储账户名称"
    $resourceGroup = "存储账户所属的资源组名称"
    
    $storageKey = (Get-AzStorageAccountKey -ResourceGroupName $resourceGroup -AccountName $storageAccount).Value[0]
    $storageContext = New-AzStorageContext -StorageAccountName $storageAccount -StorageAccountKey $storageKey
    
    Get-ChildItem -Path $localFolderPath -Recurse | Set-AzStorageBlobContent -Container $targetContainer -Context $storageContext
    

内容的提问来源于stack exchange,提问作者Jass Sanghera

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.06 02:01:06