Copy blobs from one storage container to another storage Container in Microsoft Azure

InfoPath alternatives for form designing SharePoint

In my previous post we discussed how to create storage container and upload video files to it.

We had further requirement to move the files from one container to another container.

As I have mentioned in my earlier blogs we can achieve by console application and powershell script.

I will be providing the powershell script for the same.

We will have to define source and destination storage account details to copy the blobs.

Please find the code below. Hope it will be helpful.

$srcAcc = “samstorage”

$srcAccKey = “*************************** ==”

$srccontName = “srcvideocontainer”

$srcctx = New-AzureStorageContext -StorageAccountName $srcAcc -StorageAccountKey $srcAccKey

$destAcc = “deststorage”

$destAccKey = “*************************** ==”

$destcontName = “destcontainername”

$destctx = New-AzureStorageContext -StorageAccountName $destcontName -StorageAccountKey $destAccKey

#source container reference

$blobs = Get-AzureStorageBlob -Container $srccontName -Context $srcctx

#Copy blobs

$blobs| Start-AzureStorageBlobCopy -DestContainer $destcontName -DestContext $destctx

Similar SharePoint 2013 Tutorials


About Sambita Rath

I have 9 years of exprience into SharePoint implementation, architecture, Administrator, development and Training.Designing Information Architecture in SharePoint 2007, 2010,2013 and Office 365.

View all posts by Sambita Rath →

Leave a Reply