Skip to content

Can't exclude numeric named directory from batch delete #27809

@dawiduniec

Description

@dawiduniec

Describe the bug

When Im trying to batch delete all content except single directory it doesnt work with numeric values. It doest work with letters, ie.

az storage blob delete-batch --dryrun --source blo --account-name bloaccount --pattern '[!abc]*'

This one doesnt work:

az storage blob delete-batch --dryrun --source blo --account-name bloaccount --pattern '[!123]*'

Related command

az storage blob delete-batch --dryrun --source blo --account-name bloaccount --pattern '[!123]*'

Errors

No errors

Issue script & Debug output

pattern [!123]*
container bla
total 0
operations

Expected behavior

Should list all files excluding directory 123

Environment Summary

azure-cli 2.53.1

core 2.53.1
telemetry 1.1.0

Extensions:
ai-examples 0.2.5
aks-preview 0.5.149
ml 2.21.1
ssh 2.0.2

Dependencies:
msal 1.24.0b2
azure-mgmt-resource 23.1.0b2

Python location '/usr/bin/python3.9'
Extensions directory '/home/xxx/.azure/cliextensions'
Extensions system directory '/usr/lib/python3.9/site-packages/azure-cli-extensions'

Python (Linux) 3.9.14 (main, Oct 12 2023, 19:48:32)
[GCC 11.2.0]

Legal docs and information: aka.ms/AzureCliLegal

Additional context

All directories have numeric values, ie. 1698355393591

Metadata

Metadata

Labels

Auto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamStorageaz storageact-codegen-extensibility-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions