Azure Blob Storage

Afternoon,

I have managed to download a single file from blob storage, however the file name keeps changing dependant on what time it was downloaded. Is there a way of downloading all files in a certain location regardless of the file names? The below is working but for a single csv file.

#Libraries Required
library(AzureStor)
library(tidyr)
library(dplyr)
library(tidyverse)
library(lubridate)
library(RODBC)
library(plyr)

StorageURL <- "https://blahblahblah.net"
StorageKey <- "123455678"
Blob <- "aBlob"


BlobFile <- "filename.csv"
SaveTo <- "C:/Users/Me/Documents/blob.csv"


Storage <- storage_endpoint(StorageURL, 
                            key = StorageKey)
Container <- storage_container(Storage, Blob)

storage_download(Container, BlobFile, SaveTo , overwrite = TRUE)
rm(list = ls())

Forecast <- read.csv("C:/Users/Me/Documents/blob.csv")

storage_multidownload lets you download everything in a given location. Set the source to a wildcard spec, and the destination to a directory.

storage_multidownload(Container, "*", "dest_dir")
1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.