Search code examples
azureazure-blob-storageazure-cliazure-sdk-python

Using a delimiter with azure storage blob list


The Python SDK for Azure provides the list_blobs method for listing blobs present in a container using a container name, prefix and a delimiter.

The Node.js based azure-cli also provides an option for listing blobs

azure storage blob list [options] [container] [prefix]

I checked the help for the above mentioned command and couldn't find an option for using a delimiter.

Is there a way for using a delimiter with the above mentioned command ?


Solution

  • Is there a way for using a delimiter with the above mentioned command ?

    As of today, no. There's no option to specify a delimiter when listing blobs in a blob container.

    CLI Tools source code is available on Github: https://github.com/Azure/azure-xplat-cli. What you could do is raise an issue there and ask for this feature or try to implement this feature yourself. The file where you would be making changes is: https://github.com/Azure/azure-xplat-cli/blob/dev/lib/commands/storage/storage.blob._js.