I have a PowerShell script that currently deletes all blobs in my $web container.
az storage blob delete-batch --account-name myaccountname --source $web
This works great, but now I want to exclude two directories from being deleted. I've looked over the documentation and I'm still not sure how the exclusion syntax is supposed to look.
I'm certain that I have to use the --pattern
parameter.
The pattern used for globbing files or blobs in the source. The supported patterns are '*', '?', '[seq]', and '[!seq]'.
I'm hoping someone can let me know what the value of the --pattern
param should look like so that I can delete everything in the $web container except the blobs in the /aaa
and /bbb
directories.
az storage blob delete-batch --account-name myaccountname --source $web --pattern ???