Bulk upload files with the azure CLI

Source: Internet
Author: User

In a Windows environment, we can use Azcopy to upload files in bulk. Its efficiency and transmission rate are very fast.

In a Linux or MacOS environment, you can use the Azure CLI to implement bulk file uploads.

The following script can implement this functionality.

#!/bin/Bashcontainer=Hwcbtype=Blockstorageaccount=Hwteststoragekey=pbhrx8d+ldakyhm2ffljpyygsisblbdqh8o45iv12blfvdji8kxbqte17plpcg0pftu3yabqueeuwum0tisobw==Files=`ls-L |awk '/rw/{print $9}'` for file inch$files Do  if[-F $file]; Then/usr/local/bin/azure storage blob upload-f./$file--container $container-B $file-T $btype-a $storageaccount-k $storagekeyElse      Echo "$file is a Directory"  fi Done

Each of these variables can be modified according to their actual situation.

Bulk upload files with the azure CLI

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.