private async Task StartCopyFromFile(long taskId, IStorageBlobManagement destChannel, CloudFile srcFile, CloudBlockBlob destBlob) { bool destExist = true; try { await destBlob.FetchAttributesAsync(null, this.RequestOptions, this.OperationContext, this.CmdletCancellationToken); } catch (StorageException ex) { if (ex.IsNotFoundException()) { destExist = false; } else { throw; } } if (!destExist || this.ConfirmOverwrite(srcFile.Uri.ToString(), destBlob.Uri.ToString())) { string copyId = await destBlob.StartCopyAsync(srcFile.GenerateCopySourceFile(), null, null, this.RequestOptions, this.OperationContext, this.CmdletCancellationToken); this.OutputStream.WriteVerbose(taskId, String.Format(Resources.CopyDestinationBlobPending, destBlob.Name, destBlob.Container.Name, copyId)); this.WriteCloudBlobObject(taskId, destChannel, destBlob); } }