How to Delete Directory from Azure Storage Account?

Hi All,
Currently i am working on Microsoft Windows Azure (SaaS - Application).
I am facing a problem with the AzureStorage.
I want to delete a whole directory from the Azure Storage Account.
For Example : I want to delete following Directory(14).
https://azurestorage.blob.core.windows.net/blobname/Images/14
Any help will be appriciated. 
Thanks in Advance.
Rakesh T. Gupta, Web Engineer, Ahmedabad, India

Hi Rakesh,
We have not heard you in days. Have you managed to write the code to delete a blob directory?
If not, I'd like to share my code for your reference:
    public void RemoveBlobDirectory()
        string containerName = "blobname";
        string directoryName = "blobname/Images/14/";
        var storageAccount = CloudStorageAccount.Parse("UseDevelopmentStorage=true");
        var blobStorage = storageAccount.CreateCloudBlobClient();
        // Ensure the container is exist.
        var blobContainer = blobStorage.GetContainerReference(containerName);
        blobContainer.CreateIfNotExist();
        foreach (IListBlobItem item in blobStorage.ListBlobsWithPrefix(directoryName))
            if (item.GetType() == typeof(CloudBlob) || item.GetType().BaseType == typeof(CloudBlob))
                ((CloudBlob)item).DeleteIfExists();
Please note that the ListBlobsWithPrefix method will scan through all blob entities in order to search the result. So it will potentially have low performance when you have large number of blobs in you storage account.
Thanks,
Wengchao Zeng
Please mark the replies as answers if they help or unmark if not.
If you have any feedback about my replies, please contact
[email protected]
Microsoft One Code Framework

Similar Messages

  • How to delete everything from my iCloud account

    I restored my iphone then recover my all data from iCloud.
    After that:
    When I open Safari, I found list of websait that was opened on Safari before restore.
    I notice that because iCloud. I want to delete all my data in iCloud to delete this websait.
    How can I delete all my data from iCloud ?

    Welcome to the Apple Community.
    I cloud Tabs from other devices will remove themselves after a few weeks.

  • How to delete tracks from iPod / Storage problem,

    I'm using iCloud to store music but keep getting a message " storage almost full". when I check icloud theres plenty of storage. I think it may the tracks on the iPod creating to problem. Have plugged ipod into iTunes and shows a " On this iPod" option, which has 404 tracks. I try to delete by selecting delete but does not work and looked at other suggestions e.g slide the track lesf to right which also fails. Any advise apprecaited. Phil GT

    - On the iPod if you swipe a song left or right a Delete buton should pop up. Tap it to dele the song.
    - You can delete all Music by going to Settings>General>Usage>Music>Music> Edit in upper right and then Delete.
    - You said " I try to delete by selecting delete but does not work " just whee are you doing that?
    - Same for "slide the track lesf to right which also fails.".

  • How do i delet music from my iTunes account?

    How do I delete music from my iTunes account?

    Hello tadjellis,
    It sounds like you have purchases in your iTunes library you no longer want or want to see. You can hide the purchases with your iTunes account settings, and this article will help you:
    iTunes Store: Hiding and unhiding purchases
    http://support.apple.com/kb/ht4919
    Use iTunes on a Mac or PC to hide or unhide your purchases.
    To hide your purchases
    Open iTunes on your Mac or PC.
    From the Store menu, choose Store > Sign In, and then enter your Apple ID and password.
    Go to the iTunes Store.
    Click Purchased from the Quick Links section on the right side of the iTunes Store.
    Choose a content type by clicking on Music, TV Shows, Apps, or Books from top.
    Hover your cursor over the item you want to hide.
    You will see an "X" either to the right or left top corner of the item.
    Click the "X" to hide that item. A confirmation dialog will appear once you click the "X."
    Thank you for using Apple Support Communities.
    All the very best,
    Sterling

  • How to complete delete everything from my icloud account.

    How to complete delete everything from my icloud account. Like brand new.

    First go to Settings>iCloud on your device and confirm that everything is turned to Off, and that you are not syncing any data with iCloud before proceeding.  (If you are, when you delete the data from iCloud it will also be deleted from your device and it will be lost.)  When you turn these off, you will be given the option to keep the data on your device.
    To delete your contacts, go to iCloud.com from your computer, log into your iCloud account and open Contacts, click on All Contacts on the left, to the right click on any single contact to select it, click on the Actions (gear shaped) icon at the bottom left and choose Select All, then press the Delete key on your keyboard.
    For Calendars, open your calendar on icloud.com, click Edit on the bottom left, then tap the minus sign to the right of each calendar to delete it.
    For Notes, open notes on icloud.com, click on each note on the left, then click Delete at the top to delete it.
    For Reminders, open reminders on icloud.com, click on each reminder and press your Delete key to delete it.
    For Mail, open your mail on icloud.com, click each folder on the left (such as your inbox), click on a single message to the right, press Control-A on your keyboard to select them all, then press your Delete key.  Repeat this for each of your mail folders except Trash.  When finished, click on the actions (gear-shaped) icon on the bottom left and select Empty Trash.
    To delete your my photo stream photos, open the album, tap Edit, tap the photos, tap the trash icon. If you want to keep a copy of them on your device, save them to your camera roll first.

  • HT4759 How can I add or delete iphones from my icloud account?

    How can I add or delete iphones from my icloud account?

    Hi Inspiration69,
    I apologize, I'm a bit unclear on your question. If you are asking how to set up your iCloud account on your iPhone, you may find the following page helpful:
    Apple - iCloud - Setup
    https://www.apple.com/icloud/setup/ios.html
    Regards,
    - Brenden

  • How to I recover deleted pictures from my iCloud account?

    How do I recover deleted pictures from my iCloud account?

    Welcome to the Apple Community.
    If they are in the camera roll you'll need to restore from a back up made before you deleted them.

  • I've recycled my iPhone 5 how do i delete it from my iCloud account?

    i recycled my iPhone 5 and iPad mini. i was able to delete them from my iTunes account but they show up on my iCloud account.  how do i delete them from the iCloud account.

    The following has instructions on selling or giving away an iPhone, including Remove from Account: What to do before selling or giving away your iPhone, iPad, or iPod touch

  • Large Files from FTP to Azure Storage Account.

             We required to transfer files from FTP to Azure Storage Account.
    Our FTP contains Almost 4 TB data and in future it will be growing.
    We require some automate process which will transfer data from FTP to Windows Azure Storage.
    Currently Implemented Solution:  We have created
    a windows service which will download files from FTP and converting to file stream and with Blob Storage object it will be uploaded to
    Storage account.
    With the mentioned approach bandwidth is utilized at 2 places
    For downloading file from FTP
    For Uploading to Azure Storage 
    Can you please provide any solution/suggestion which will reduce the consumption of bandwidth and large data will transfer in less time

    Hi,
    Please have a look at below article, it is talking about Blob Transfer Utility tool. Blob Transfer Utility is a GUI tool to upload and download thousands of small/large files to/from Windows Azure Blob Storage.
    #https://blobtransferutility.codeplex.com/
    Disclaimer: This is not a Microsoft official tool and it is not supported by Microsoft. It's just a (very useful) sample.
    Best Regards,
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I have just 50 Cents on my iTunes Gift Card and I can't buy anything. How to delete it from my account?

    I have just 50 Cents on my iTunes Gift Card and I can't buy anything. How to delete it from my account?

    You can purchase a new iTunes card to increase the credit or contact iTunes Support to have them clear the credit.

  • How do i delete music from my itunes account and my ipod nano 3rd gen

    how do i delete music from my itunes account and my ipod nano 3rd gen

    Are you wanting to delete it all or just certain tracks and content?
    If it's the latter...
    How you delete content from your iPod depends on how it is set up to receive content from your iTunes library whether that be via automatic syncing or manual management.
    For automatic syncing, you must reconfigure your settings so that the album/tracks/content you wish to remove is no longer configured to sync to your iPod.  For example, if the Sync only checked songs and videos option is enabled from under the iPod's Summary tab, make sure all the tracks for this album do NOT have a tick mark next to them in your iPod.  Then resync your iPod with iTunes.
    If that isn't the case, you'll want to look at the iPod's Music configuration tab.  You can access this tab by selecting your iPod under Devices. This should bring you to theSummary tab over to the right.  Look for the Music tab along the top and select it.  Here you can configure how and what music syncs to your device.  If you make any changes to this tab, be sure to hit the Apply button in the lower right hand corner to sync the updated changes to your device.
    Otherwise, if you manually manage your iPod's contents, you must manually remove content from it.  You can do this by plugging your iPod in and clicking the small black triangle next to your iPod from under the Devices section in the left hand pane of iTunes.  This will open up a submenu of content that is indented underneath the name of your device, so go ahead and click on Music (or whatever content you are wanting to remove).  Locate the track or tracks/content you wish to delete. Highlight them and hit the Delete key or choose Edit -> Delete.
    B-rock

  • Windows Azure Storage Account Location change

    Hi Experts,
    I have deployed my Web site on Windows azure. I have created Windows Azure Storage Account. By mistakely i have set the location wrong. How can we change the location of Windows storage account? 
    Thanks!

    Hello CRM Inn,
    I am sorry to know that you have chosen an incorrect location and would like to change the location for your storage account. Unfortunately, there is no option available to change the storage location for an existing storage account.
    Your only option would be to create a new storage account, migrate data to the new storage account and delete the existing one. You can refer to this article that will give you information on migrating data from one account to another:
    http://blogs.msdn.com/b/windowsazurestorage/archive/2012/06/12/introducing-asynchronous-cross-account-copy-blob.aspx
    I also suggest that you create affinity groups. By creating affinity groups you can be sure that all your related services are under the same data center. You can refer to this article to learn about Affinity groups:
    http://msdn.microsoft.com/en-us/library/azure/jj156209.aspx
    Syed irfan Hussain

  • HT1146 I can not delete messages from my gmail account - help please

    My deleted messages from my gmail account keep coming back. How can I permanently delete them?

    Hello,
    Certain Thunderbird problems can be solved by peforming a ''Clean Reinstall''. This means you remove Thunderbird's Program Files then reinstall Thunderbird. Please follow these steps:
    #Download the latest version of Thunderbird from http://www.mozilla.org/en-US/thunderbird/ and save the setup file to your computer.
    #After the download is complete, close all Thunderbird windows (Click Exit/Quit from the menu button on the right).
    #*'''Windows:'''
    #** C:\Program Files\Mozilla Thunderbird\
    #** C:\Program Files (x86)\Mozilla Thunderbird\
    #*'''Mac:''' Delete Thunderbird from the Applications folder.
    #*'''Linux:''' If you installed Thunderbird with the distro-based package manager, you should use the same way to uninstall it - see [[Installing Thunderbird on Linux]]. If you downloaded and installed the binary package from the [http://www.mozilla.org/en-US/thunderbird/ Thunderbird Download Page], simply remove the folder ''thunderbird'' in your home directory.
    #Now, go ahead and reinstall Thunderbird:
    ##Double-click the downloaded installation file and go through the steps of the installation wizard.
    ##Once the wizard is finished, choose to open Thunderbird after clicking the Finish button.
    <b>WARNING:</b> Do not run Thunderbird's uninstaller or use a third party remover as part of this process, because that could permanently delete your Thunderbird data, including but not limited to, extensions,emails, personal settings and saved passwords. <u>These cannot be recovered unless they have been backed up to an external device!</u>
    Please report back to see if this helped you!
    Thank you.

  • Is there any way to automate purging Application Logging in azure storage account tables

    is there any way to automate purging Application Logging in azure storage account tables
    Rohit Pasrija

    hi Rohit,
    If you want to delete old data automatically, I think you need develop this feature by yourself. You could code the logic methods on your project, and set a timer to execute the methods to delete old data. Please refer to this thread (http://stackoverflow.com/questions/13602629/is-it-possible-to-acces-a-table-storage-in-azure-from-an-azure-web-site
    ), you could operate table storage data using azure sdk or REST API.
    Please try it.
    Regards,
    Will
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to delete photos from my iPad that were synced from an old version of iTunes and the computer that had the photos no longer exists.

    I need to delete photos from my iPad that were synced with an old version of iTunes on a computer that is no longer functioning. Please help.
    Alos, I need to move many photos from my iPad to storage place.  Any recommendations on backup drives for an iPad 2?

    The links below have instructions for deleting photos.
    iOS and iPod: Syncing photos using iTunes
    http://support.apple.com/kb/HT4236
    iPad Tip: How to Delete Photos from Your iPad in the Photos App
    http://ipadacademy.com/2011/08/ipad-tip-how-to-delete-photos-from-your-ipad-in-t he-photos-app
    Another Way to Quickly Delete Photos from Your iPad (Mac Only)
    http://ipadacademy.com/2011/09/another-way-to-quickly-delete-photos-from-your-ip ad-mac-only
    How to Delete Photos from iPad
    http://www.wondershare.com/apple-idevice/how-to-delete-photos-from-ipad.html
    iPhoto for iOS (iPad): Delete photos from iPhoto
    http://support.apple.com/kb/ph3137
    How to: Batch Delete Photos on the iPad
    http://www.lifeisaprayer.com/blog/2010/how-batch-delete-photos-ipad
    (With iOS 5.1, use 2 fingers)
    How to Delete Photos from iCloud’s Photo Stream
    http://www.cultofmac.com/124235/how-to-delete-photos-from-iclouds-photo-stream/
    ~~~~~~~~~~~~
    There are some wireless external hard drives that can be used with the iPad.
    Best iPad External Hard Drive Storage Options
    http://www.unlocktips.com/2012/11/best-ipad-mini-external-hard-drive-memory-stor age-options/
    Another option:
    Expand your iPad's storage capacity with HyperDrive
    http://www.macworld.com/article/1153935/hyperdrive.html
    On the road with a camera, an iPad, and a Hyperdrive
    http://www.macworld.com/article/1160231/ipadhyperdrive.html
     Cheers, Tom

Maybe you are looking for

  • Why does not my iPhone 5S work on LTE of Plus GSM network in Poland although my model supports LTE Band 3?

    am My iPhone 5S does not support LTE of the Plus GSM network in Poland? It works in Band 3 and my model supports that band but it is not possible to use LTE although it works on my other Android phone. The network operator suggested contacting Apple.

  • Freight condition getting multiplied with the quantity

    Dear Gurus, I have configured freight  condition, ZHD0, copied from HD00. When I am putting Rs 1000 in header, if i have 10 quantities, it is getting multipled with 10 and getting the total as 10000. I want it to be 1000 only and not get multipled wi

  • Adobe air ane for android build

    I have created a ane of android. with an error that it is jdk1.7, there is no problem that it is jdk1.6. it's jdk1.7 the jar of ane do not create?

  • Dual ADSL Load Balancing and Fault tolerance

    Just wonder if this is doable with for example 2 WIC-1ADSL cards on say a 2800 series platform. The application would be simple internet access. If so could someone provide a sample config? Just a note...this application would include two static ip A

  • De-authorize computers not possible

    hi, I tried to de-authorize all the computers that i authorized for using my purchased music. But when i log on to my account panel there's no button to de-authorize the computers. It just says i authorized 4 computers but i lost track of which compu