CopyFile

Copies a blob or file to a destination file within the storage account.

Properties

Azure Storage Credential

  • Account Name - The name of your Azure storage account.
  • Access Key - Your Azure account access key.
  • EndpointSuffix - To create a connection string for a storage service in a specific region.
  • BlobStorageUri - The Uri to the location of the Blob storage you want to access.
    • PrimaryUri and SecondaryUri settings available
  • FileStorageUri - The Uri to the location of the File storage you want to access.
    • PrimaryUri and SecondaryUri settings available
  • TableStorageUri - The Uri to the location of the Table storage you want to access.
    • PrimaryUri and SecondaryUri settings available
  • QueueStorageUri - The Uri to the location of the Queue storage you want to access.
    • PrimaryUri and SecondaryUri settings available

Target share name

The file share name where the target file exists.

Target directory path

The name or path of the directory of the target file. For example, for subdirectory2 existing in subdirectory in maindirectory, the directory path is maindirectory/subdirectory/subdirectory2. If not specified, the root directory is accessed.

Target file name

Name of the file where data will be copied. If the file already exists, its data will be overwritten. The target file cannot be modified while the copy operation is in progress.

Source uri

The uri or SAS url of the source file or blob. Please, specify either 'Source uri' or 'Source share name' and 'Source file name' or 'Source blob container name' and 'Source blob name'.

Source share name

Azure Storage credentials for the account in which the source file exists. Specify if copying data from another account. If copying a file from another account, please use Source Uri parameter.

Source directory path

The name or path of the directory of the source file. For example, for subdirectory2 existing in subdirectory in maindirectory, the directory path is maindirectory/subdirectory/subdirectory2. If not specified, the root directory is accessed. Please, specify either 'Source uri' or 'Source share name' and 'Source file name' or 'Source blob container name' and 'Source blob name'.

Source file name

Name of the source file. Please, specify either 'Source uri' or 'Source share name' and 'Source file name' or 'Source blob container name' and 'Source blob name'.

Source blob container name

The container name where the source blob exists. If not specified, the root container is accessed. Please, specify either 'Source uri' or 'Source share name' and 'Source file name' or 'Source blob container name' and 'Source blob name'.

Source relative address

The relative address of the source blob. Please, specify either 'Source uri' or 'Source share name' and 'Source file name' or 'Source blob container name' and 'Source blob name'.

Source blob name

The name of the source blob. Please, specify either 'Source uri' or 'Source share name' and 'Source file name' or 'Source blob container name' and 'Source blob name'.


Please refer to the following Azure API reference documentation:

Configure Azure Storage connection strings:

https://docs.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string

https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.storage.auth.storagecredentials.-ctor?view=azure-dotnet#Microsoft_Azure_Storage_Auth_StorageCredentials__ctor_System_String_System_String_

https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.storage.cloudstorageaccount.-ctor?view=azure-dotnet#Microsoft_Azure_Storage_CloudStorageAccount__ctor_Microsoft_Azure_Storage_Auth_StorageCredentials_System_String_System_Boolean_

https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.storage.cloudstorageaccount.-ctor?view=azure-dotnet#Microsoft_Azure_Storage_CloudStorageAccount__ctor_Microsoft_Azure_Storage_Auth_StorageCredentials_Microsoft_Azure_Storage_StorageUri_Microsoft_Azure_Storage_StorageUri_Microsoft_Azure_Storage_StorageUri_Microsoft_Azure_Storage_StorageUri_

Documentation to assist in setting properties:

https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.storage.file.cloudfile.startcopy?view=azure-dotnet

https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.storage.file.cloudfileclient.getsharereference?view=azure-dotnet

https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.storage.file.cloudfiledirectory.getdirectoryreference?view=azure-dotnet

https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.storage.file.cloudfiledirectory.getfilereference?view=azure-dotnet