-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathProgram.cs
25 lines (24 loc) · 902 Bytes
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using System;
using System.IO;
using Microsoft.Azure.Storage.Blob;
using Microsoft.Azure.Storage;
namespace DataWarehouseLoad
{
class Program
{
static void Main(string[] args)
{
Console.Write("Enter your storage account connection string: ");
string connectionString = Console.ReadLine();
var account = CloudStorageAccount.Parse(connectionString);
var client = account.CreateCloudBlobClient();
var container = client.GetContainerReference("demographics");
container.CreateIfNotExists();
foreach(var file in Directory.GetFiles($"{Environment.CurrentDirectory}//CountyDelimited")) {
var blob = container.GetBlockBlobReference(Path.GetFileName(file).ToLower());
blob.UploadFromFile(file);
}
Console.WriteLine("Done.");
}
}
}