none
How can I list the blobs in an Azure Storage Continer subfolder?

    Question

  • I'm using the following to list the blobs in a storage container:

    $storageContext = New-AzureStorageContext -StorageAccountName <storage account name> -StorageAccountKey <storage account key>
    Get-AzureStorageBlob -Container <container name> -Context $storageContext
    

    I would like to be able to list blobs in a subfolder, is this possible?


    David Downing

    Monday, January 30, 2017 4:53 PM

Answers

  • I figured it out, use the -Blob with a path and filter as follows:

    $storageContext = New-AzureStorageContext -StorageAccountName <storage account name> -StorageAccountKey <storage account key>
    Get-AzureStorageBlob -Blob <path>/filter -Container <container name> -Context $storageContext

    Get-AzureStorageBlob -Blob example/data/people.seq/* -Container <container name> -Context $storageContext


    David Downing



    • Marked as answer by Dave Downing Monday, January 30, 2017 5:17 PM
    • Edited by Dave Downing Monday, January 30, 2017 5:17 PM
    Monday, January 30, 2017 5:16 PM