Reputation: 93
I have multiple folder named after the year\month\days. It's in a Azure blob storage if that change anything, I already have the code that download files from the blob storage. Like:
And I have a table in a SQL database with wildcards and the last datetime the file was downloaded (the same datetime in the file name).
I need to download all the files that match the wildcard and is after the date retrieved from the SQL table (column LastDateTime). I assume it will be heavy to search all the folder for the wildcard, especially when there will be multiples years of data.
I guess I can just add the download function in a if statement to verify the date like so:
if ([Date time part of the name file] > [my variable with the LastDateTime])
{
DownloadFromBlob([filename]) //Custom function
}
But I don't want to go through all the folders.
What is the best approach to do this in C# (.NET Framework 4.7)?
Upvotes: 1
Views: 411