Create a Folder structure in Azure storage Containers v12k

KacheTech Developers 1 Reputation point


I am currently learning how to work with Azure Storage. I have lots of references for the old nuget package for CloudBlob client but i have not found any referencing how to create a directory or folder structure in Azure Storage. Is there a replacement for the getDirectoryRefernce method or is there a new way to create folders

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,314 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,095 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. deherman-MSFT 30,466 Reputation points Microsoft Employee

    @KacheTech Developers
    Firstly apologies for the delay in responding and any inconvenience this may have caused. By default Blobs are organized in a flat listing rather than hierarchical. There is a good explanation in the documentation here, as well as some sample code. If you do not have hierarchical namespaces enabled you can simply use a delimiter character and folder in the blob name. There is a Stack Overflow question also asking about the GetDirectoryReference replacement and a GitHub issue that you might find useful. Please checkout the Quickstart with examples of creating containers and uploading blobs.

    Since you would like to create a folder structure you might consider enabling Azure Data Lake Storage Gen2 hierarchical namespace. If you enable this you can find information on creating and managing directories here.

    Hope this helps. Let me know if you have further questions or issues and I will be happy to help.


    Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments