locked
Bulk delete of Azure blobs based on provided file types. RRS feed

  • Question

  • There are more than 10 million documents consisting of several file formats (.doc, .docx, .html, .xml etc..) are stored across several virtual directories in an azure container in Azure blob storage. We need to bulk delete only the .html and .xml files.

    Is there any way to achieve this? Thanks in Advance!

    Regards,

    Abhijit


    Abhijit Mahato - Microsoft Community Contributor 2011 - MCTS BizTalk Server blog: http://abhijitmahato.wordpress.com/ Please "Mark as Answer" if Post has Answered the Question

    Friday, February 23, 2018 6:03 PM

Answers

  • Absolutely, this is a job for PowerShell!

    Something like (stand back sudo code in coming!):

    Get-AzureStorageBlob -Container "MyFullOfFilesContainer" -Blob "*.htlm" | Remove-AzureStorageBlob -force;

    Hope that helps, marks as answered if so and PowerShell on my friend!

    ~Theo



    Friday, February 23, 2018 6:24 PM

All replies

  • Absolutely, this is a job for PowerShell!

    Something like (stand back sudo code in coming!):

    Get-AzureStorageBlob -Container "MyFullOfFilesContainer" -Blob "*.htlm" | Remove-AzureStorageBlob -force;

    Hope that helps, marks as answered if so and PowerShell on my friend!

    ~Theo



    Friday, February 23, 2018 6:24 PM
  • Thank you! It worked..

    Abhijit Mahato - Microsoft Community Contributor 2011 - MCTS BizTalk Server blog: http://abhijitmahato.wordpress.com/ Please "Mark as Answer" if Post has Answered the Question

    Sunday, February 25, 2018 4:35 AM