简体   繁体   English

从Azure Batch下载文件

[英]Download Files from Azure Batch

I would like to download the files after the task is complete. 我想在任务完成后下载文件。 How can I do it efficiently? 我如何有效地做到这一点?

Unfortunately, task.EnvironmentSettings is null and the following code snipet does not work (see the Microsoft instructions ). 不幸的是, task.EnvironmentSettings为null,并且以下代码片段不起作用(请参阅Microsoft 说明 )。

IList<environmentsetting> listEnv = task.EnvironmentSettings;

var envList = listEnv.Where(x => x.Name == "AZ_BATCH_TASK_WORKING_DIR").ToList();

also

var fileList = task.FilesToStage 

trigerrs the error: The property FilesToStage cannot be read while the object is in the Bound state. 触发错误: 该对象处于“绑定”状态时无法读取属性FilesToStage。

The following methods provide access to a task's files: 以下方法提供对任务文件的访问:

You can list the files in the CloudTask's directory on its compute node with: 您可以使用以下命令在其计算节点上的CloudTask目录中列出文件:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM