Skip to content

Improve --pattern documentation with additional examples #10382

@tomfaltesek

Description

@tomfaltesek

Resource Provider
Azure Storage Blobs

Description of Work Requested
I'd like to suggest expanding the documentation around the --pattern parameter. Specifically, there is a lack of examples for common globbing scenarios. The tools for powerful patterns seem to be available, but the exact syntax required to achieve certain outcomes is not obvious.

I opened this SO question about making an exclusion pattern for the az storage blob delete-batch command. You can find other folks having trouble with different scenarios.

I'm sure you can think of many example patterns that one might want to use, but here's a quick brain dump:

  • Delete everything except for one specific directory
  • Delete everything except for multiple specific directories
  • Delete everything in a specific nested directory
  • Delete all but one particular blob in a specific nested directory
  • Delete everything from a specific directory that matches an extension (*.txt)
  • Delete everything from a specific directory that matches multiple extensions (*.txt or *.html)
  • Delete everything from a specific directory that does NOT match an extension (*.txt)
  • Delete everything from a specific directory that does NOT match multiple extensions (*.txt or *.html)

Providing such examples in the documentation will help others to form the correct patterns for their needs.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions