using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Excel = Microsoft.Office.Interop.Excel;
using Azure;
using Azure.Storage.Files.Shares;
using Azure.Storage.Files.Shares.Models;
namespace SpeakerDocumentsMigration
{
class Program
{
static string connectionstring = "";
static string filesharename = "";
static string Sourcepath = "";
static string DestPath = "";
static void Main(string[] args)
{
ShareFileClient sourcefile = new ShareFileClient(connectionstring, filesharename,Sourcepath);
ShareFileClient destfile = new ShareFileClient(connectionstring, filesharename, DestPath);
destfile.StartCopy(sourcefile.Uri);
}
}
}
Seems like above code is not working, assuming I enter values for all the variables declared.
Can someone please guide how can I proceed?
I tried the below code and can copy one file from one folder to another within one Azure Fileshare using C# dot net.
Code :
Output :
It runs successfully and copies one file from one folder to another in Fileshare.
I got the copied data from one file from one folder to another in file share at the Azure portal as below.
Source folder file :
Destination folder file :