Azure Data Lake Storage rename folder with 10M files

Pedro Matos 5 Reputation points
2026-05-17T17:43:57.6366667+00:00

Hello.

I want to rename a folder with 10 million files, but I have doubts about the cost and the difference between write operations and iteractive write operations.

What is the cost of rename a folder with 10M files in an ADLS RA-GRS west europe and how much time takes?
I want to archive the folder by change the name and create a new one with the same name for streaming operations.

Thanks for the attention.

Best Regards,

Pedro.

Azure Data Lake Storage
Azure Data Lake Storage

An Azure service that provides an enterprise-wide hyper-scale repository for big data analytic workloads and is integrated with Azure Blob Storage.

0 comments No comments

2 answers

Sort by: Most helpful
  1. kagiyama yutaka 3,925 Reputation points
    2026-05-18T03:36:40.11+00:00

    I think in ADLS Gen2 a folder rename is billed as one iterative‑write on the directory, even with 10M files, and the only reliable way to know the timing is to run a small rename test in the same RA‑GRS West Europe account.

    Was this answer helpful?


  2. AI answer

    2026-05-17T17:44:13.6966667+00:00

    In an Azure Data Lake Storage account with hierarchical namespace (ADLS Gen2), a folder (directory) rename is a single iterative write operation, regardless of how many files it contains. The cost and behavior differ significantly from a flat-namespace Blob account, where each blob would need to be copied and deleted.

    Cost model for renaming a folder with 10M files in ADLS

    For hierarchical namespace (Data Lake endpoint dfs.core.windows.net):

    • Directory rename is billed as one iterative write operation.
    • Sample (fictitious) price for iterative write operations to the Data Lake endpoint is:
      • $0.1430 per 100 iterative write operations in all tiers (Hot/Cool/Cold/Archive).
    • Therefore, renaming a single directory (even with 10M files) costs on the order of one iterative write:
      • Approximate operation cost ≈ $0.1430 / 100 = $0.00143 per directory rename (using the sample prices).

    The documentation also compares directory rename costs:

    • For hierarchical namespace (Data Lake), renaming 1,000 directories (each with 1,000 blobs) costs $0.715 in the hot tier, which is consistent with 1,000 iterative write operations at $0.1430 per 100.
    • This confirms that the cost is per-directory-rename, not per-file.

    So, renaming one folder that contains 10 million files in ADLS RA-GRS West Europe will still be charged as one iterative write operation at the Data Lake endpoint, using the applicable regional/tier price for iterative writes. The example numbers above are sample prices; the actual RA‑GRS West Europe price must be taken from the official pricing page, but the billing unit (1 iterative write per directory rename) remains the same.

    Difference: write vs iterative write

    From the provided pricing tables:

    • Blob Service endpoint (blob.core.windows.net)
      • Standard write operations are priced per 10,000 operations.
      • In a flat namespace, renaming effectively means copy + delete per blob, so renaming many blobs is many write operations.
    • Data Lake Storage endpoint (dfs.core.windows.net)
      • Write operations (every 4 MiB) are priced per 10,000.
      • Iterative write operations are priced per 100 and are used for metadata-heavy, multi-object operations, such as directory renames.
      • A directory rename in ADLS is such an iterative write and does not iterate over and bill per file.

    This is why renaming directories is far cheaper and more efficient in hierarchical namespace accounts than in flat namespace accounts.

    Time to rename a folder with 10M files

    The documentation provides cost and operation type, but not explicit time/latency guarantees. What is documented:

    • In hierarchical namespace accounts, directories are concrete objects and can be renamed in a single operation.
    • The rename is an iterative write at the metadata layer, not a full data copy of all files.

    Implications:

    • The operation is metadata-only, so it is much faster than copying 10M files.
    • Actual duration depends on service load, namespace complexity, and internal implementation, and is not quantified in the provided material.

    How to perform the rename

    For ADLS Gen2, a directory can be renamed using the .NET SDK or CLI as a single operation:

    • .NET example (DataLakeDirectoryClient):
    public async Task<DataLakeDirectoryClient> RenameDirectory(
        DataLakeFileSystemClient fileSystemClient,
        string directoryPath,
        string subdirectoryName,
        string subdirectoryNameNew)
    {
        DataLakeDirectoryClient directoryClient =
            fileSystemClient.GetDirectoryClient(string.Join('/', directoryPath, subdirectoryName));
    
        return await directoryClient.RenameAsync(string.Join('/', directoryPath, subdirectoryNameNew));
    }
    

    This call issues a single directory rename, which is billed as one iterative write operation.

    If using the older ADLS client library, AdlsClient.RenameAsync also renames a directory in one call.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.