DrDuran
DrDuran

Reputation: 111

Searching for filenames in blob using a wildcard

I am trying to find any file whose name begins with 'filename', but I cant work it out.

Get-AzureStorageBlob -Context $Context -Container $SourceContainer |
  Get-ChildItem Where{$_.Name -like 'filename'}

Where am I going wrong? Thank you.

Upvotes: 3

Views: 9502

Answers (1)

Joy Wang
Joy Wang

Reputation: 42043

Try the command below, it works on my side.

Get-AzureStorageBlob -Context $Context -Container $SourceContainer |
  Where-Object {$_.Name -like "filename*"}

Test result with no filter and filter:

enter image description here

Upvotes: 2

Related Questions