WebJul 5, 2024 · You can create a Timer Trigger function, fetch the list of items from the Blob Container and delete the files which does not match your criteria of last modified date. Create a Timer Trigger function. Fetch the list of blobs using CloudBlobContainer. Cast the blob items to proper type and check LastModified property. WebApr 13, 2024 · Rule: if blob exists more than 30days than it will delete the blob. But As per my case, All blobs (folders) should delete except one blob (folder) where the blob (folder) name is Backup in the container. Is there any way to add a rule for not deleting particular blob (In my case it is folder)?
Azure Function Blob Trigger copy file to File Share
WebFeb 8, 2024 · To delete a blob, you need to. var container = blobClient.GetContainerReference (containerName); var blockBlob = container.GetBlockBlobReference (fileName); return blockBlob.DeleteIfExists (); … WebMar 6, 2024 · Assume you're using this blob storage package Microsoft.Azure.Storage.Blob, version 11.1.3, then you can use blobDirectory.ListBlobs () method and set the parameter useFlatBlobListing as true which let you iterate through all the blobs within a specified directory (and as well as within the sub-directories). leasing car vs buying reddit
Delete and restore a blob with .NET - Azure Storage
WebApr 8, 2016 · A single line code to perform deletion private static async Task DeleteBLOBFile (string blobNamewithFileExtension) { BlobClient blobClient = new BlobClient (blobConnectionString,containerName,blobNamewithFileExtension); await blobClient.DeleteIfExistsAsync (); } Share Improve this answer Follow answered Mar 2, … WebJul 13, 2024 · When I perform the same operations on a local storage emulator it runs just fine and deletes the blob from the container. Here is the code that I am using to delete the blob. // Retrieve storage account from connection-string. CloudStorageAccount storageAccount = CloudStorageAccount.parse (System.getenv ("STORAGE")); // Create … WebMay 19, 2024 · CloudBlobContainer container = blobClient.GetContainerReference ("contiainername"); // Loop over items within the container and output the content, length and URI. foreach (IListBlobItem item in container.ListBlobs (null, false)) { if (item.GetType () == typeof (CloudBlockBlob)) { CloudBlockBlob blob = (CloudBlockBlob)item; string text; … leasing cashgate