Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dawiduniec opened this issue Nov 9, 2023 · 5 comments
Open

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

dawiduniec opened this issue Nov 9, 2023 · 5 comments
Assignees
Labels
Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Storage az storage
Milestone

Comments

@dawiduniec
Copy link

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

@dawiduniec dawiduniec added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Nov 9, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. Storage az storage labels Nov 9, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Nov 9, 2023
@yonzhan
Copy link
Collaborator

yonzhan commented Nov 9, 2023

Thank you for opening this issue, we will look into it.

@yonzhan yonzhan added this to the Backlog milestone Nov 9, 2023
@yonzhan yonzhan removed the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Nov 9, 2023
@calvinhzy
Copy link
Member

Hi @dawiduniec
Can you show the container structure and what file names are being skipped?
image
image

@dawiduniec
Copy link
Author

dawiduniec commented Nov 22, 2023

There are only directories on root level:

/2023-week45/
  0/
/22112023/
 1/1.png
 2/3.png
/20112023/
 1/4.png
 2/6.png

@calvinhzy
Copy link
Member

@dawiduniec Are you trying to delete all the files not starting with numeric values 1, 2, or 3? Is the expected output 4.png and 6.png?

@dawiduniec
Copy link
Author

dawiduniec commented Nov 23, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Storage az storage
Projects
None yet
Development

No branches or pull requests

4 participants