Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import azure
- from azure.storage.blob import BlockBlobService
- #from azure.storage.blob import BlobService
- #from azure.storage import *
- blob_service = BlobService(account_name='<CONTAINER>', account_key='<ACCOUNT_KEY>')
- blobs = []
- marker = None
- container = '<CONTAINER>'
- while True:
- batch = blob_service.list_blobs(container, marker=marker)
- blobs.extend(batch)
- if not batch.next_marker:
- break
- marker = batch.next_marker
- for blob in blobs:
- print(blob.name)
- result = blob_service.list_blobs(container)
- for b in result.items:
- r = blob_service.get_blob_to_path(container, b.name, "folder/{}".format(b.name))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement