Copy local file to Azure storage

When working with Azure you may require copying a file to and fro between Azure storage. Now when the Azure Price are reduced, you too might want to move your files to Azure. Copying a file to Azure is easy. You will need to have Az Copy  installed. Once you have installed it you can use the command prompt to copy files to Azure. You must execute AzCopy executable file from the directory in which it is installed. Below is the code to copy "sample.txt" from the local machine to Azure Storage. The code required access key of the storage the file is copied to or from. I use the above code in a batch file so I have mentioned the code to move to the "C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy" folder because by default the Az Copy tool is installed in that folder. The code also requires access key of the storage where the file is copied to or from. This access key can be found in Azure. Below screenshot shows you how to get the storage access key in Azure portal and copy it.

Make Money from Surveys

Popular posts from this blog

The current master key cannot be decrypted

Schema.Object has an unresolved reference to Schema

Remove dateModified related warning appearing during Structured data testing