Question: Delete all files from the Data Lake Storage Gen2 container
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
Hi Guys,
I might be blind but I cannot find a simple way to delete all files from the Data Lake Storage Gen2 container.
My use case is static website deployment. I use Data Lake Storage Gen2 as it makes it easier to work with folders.
For the simple NOT Data Lake Storage Gen2 account I can use **az storage blob delete-batch** but if I use it for the
Data Lake Storage Gen2 account container fails with the error below.
Is **az storage blob delete-batch** supposed to work with Data Lake Storage Gen2 based containers?
```
ERROR: Client-Request-ID=ab4b8793-6a68-11ec-b1bc-cdece7624657 Retry policy did not allow for a retry: Server-Timestamp=Fri, 31 Dec 2021 18:37:11 GMT, Server-Request-ID=14a0ddf1-c01e-0042-0375-fee68d000000, HTTP status code=409, Exception=This operation is not permitted on a non-empty directory. ErrorCode: DirectoryIsNotEmptyDirectoryIsNotEmptyThis operation is not permitted on a non-empty directory.RequestId:14a0ddf1-c01e-0042-0375-fee68d000000Time:2021-12-31T18:37:12.5797082Z.
ERROR: This operation is not permitted on a non-empty directory. ErrorCode: DirectoryIsNotEmpty
DirectoryIsNotEmptyThis operation is not permitted on a non-empty directory.
RequestId:14a0ddf1-c01e-0042-0375-fee68d000000
Time:2021-12-31T18:37:12.5797082Z
```
Contributor guide
Assessment
This issue has not been assessed yet.