You can directly use ShareGate or Gs Richcopy 360 to files from azure blob to on-premise or from on-premise to azure blob ,but on the other hand you can use the following steps using c#:
-Create an Azure Function App project in Visual Studio.
-Add a new Function to the project with an Azure Blob Trigger.
-Install the Azure.Storage.Blobs NuGet package to your project.
-Add the following code to the Function:
using Microsoft.Azure.WebJobs;
using Microsoft.Extensions.Logging;
using Azure.Storage.Blobs;
public static void Run(
[BlobTrigger("container-name/{name}", Connection = "AzureWebJobsStorage")] BlobClient blobClient,
string name, ILogger log)
{
log.LogInformation($"C# Blob trigger function processed blob\n Name:{name} \n URI:{blobClient.Uri}");
string filePath = @"C:\path\to\destination\file";
blobClient.DownloadTo(filePath);
}
-Replace the "container-name" placeholder in the BlobTrigger attribute with the name of the Azure Blob Storage container you want to monitor.
-Replace the file path in the filePath variable with the path to the destination file on the on-premise file system.
-Deploy the Function App to Azure and configure the connection string for AzureWebJobsStorage in the Application Settings section of the Function App.
When a new blob is added to the specified container, the Azure Blob Trigger will fire the function and download the blob to the specified file path on the on-premise file system.