How to upload a folder to Blob Storage?

RobVious picture RobVious · Jun 14, 2012 · Viewed 13.9k times · Source

I have a worker role that I use to pull data down from Blob Storage OnStart. Currently I'm testing this by uploading a test.txt file and then downloading it to a local directory. This is working fine.

I now would like to upload a folder to blob storage. This folder contains a batch script as well as several executables that the batch script calls.

What is the recommended way to accomplish this? I think zipping the folder and uploading the *.zip file would be easy... but then, once I download it locally for the worker role to handle, how would I unzip it without any third party libraries?

If there are better options, I'm open to any suggestions. Thanks for the help here - this community has been a huge help for me as I ramp up :)

Answer

Shubham Gupta picture Shubham Gupta · Nov 20, 2018

login to azure cli using az login

  1. To upload file use az storage blob upload additional-params

  2. To upload a folder use az storage blob upload-batch additional-params

Refer here for complete commands