CmdID / az / az storage / az storage azcopy / az storage azcopy blob
az storage azcopy blob upload
Upload blobs to a storage blob container using AzCopy. Azure CLI extensions reference
3 examples 4 options Its page in the Azure CLI extensions reference
Examples
Upload a single blob to a container.
az storage azcopy blob upload -c MyContainer --account-name MyStorageAccount -s "path/to/file" -d NewBlobIdentify-cThe upload destination container.-sThe source file path to upload from.-dThe upload destination path.Upload a directory to a container.
az storage azcopy blob upload -c MyContainer --account-name MyStorageAccount -s "path/to/directory" --recursiveIdentify-cThe upload destination container.-sThe source file path to upload from.--recursiveRecursively upload blobs.Upload the contents of a directory to a container.
az storage azcopy blob upload -c MyContainer --account-name MyStorageAccount -s "path/to/directory/*" --recursiveIdentify-cThe upload destination container.-sThe source file path to upload from.--recursiveRecursively upload blobs.Options
--container, -cThe upload destination container.--destination, -dThe upload destination path.--recursive, -rRecursively upload blobs.--source, -sThe source file path to upload from.