# workflows versions files

## Synopsis

<pre class="language-bash"><code class="lang-bash">omics workbench workflows versions files --workflow=WORKFLOW_ID [VERSION_ID]
<strong>  [--path=PATH]
</strong>  [--output=PATH]
  [--zip]
</code></pre>

## Description

Retrieve files belonging to a workflow version using the provided `WORKFLOW_ID` and `VERSION_ID` parameters. Behaviour depends on the values set for the flags. See the examples below for more information.

## Examples

Prints out the workflow's descriptor file to the screen:

```bash
omics workbench workflows versions files --workflow=12345678910 1.0.0
```

Prints the workflow file matching the given path to the screen. If the file is binary, the file contents will not be printed to the screen and a warning will be printed instead:

```bash
omics workbench workflows versions files --workflow=12345678910 1.0.0 \
  --path=my/path/file.wdl
```

Saves the content from the `--path` file as a file in the location specified by `--output`:

```bash
omics workbench workflows versions files --workflow=12345678910 1.0.0 \
  --path=my/path/file.wdl
  --output=output/new_file.txt
```

Saves all the workflow's files in the same hierarchy in the location specified by `--output`. Note: `--output` must end with a folder in order to store all the workflow's files:

```bash
omics workbench workflows versions files --workflow=12345678910 1.0.0 \
  --output=output/folder
```

Downloads the file specified by `--path` as a zip file in the location specified by `--output`:

```bash
omics workbench workflows versions files --workflow=12345678910 1.0.0 \
  --path=my/path/file.wdl
  --output=output/new_file.zip
  --zip
```

Downloads the file specified by `--path` as a zip file named `12345678910-1.0.0-files.zip` (`{workflow_name}-{workflow_version}-files.zip`) in the folder location specified by `--output`:

```bash
omics workbench workflows versions files --workflow=12345678910 1.0.0 \
  --path=my/path/file.wdl
  --output=output/folder
  --zip
```

Downloads the file specified by `--path` as a zip file named `12345678910-1.0.0-files.zip` in the current working directory:

```bash
omics workbench workflows versions files --workflow=12345678910 1.0.0 \
  --path=my/path/file.wdl
  --zip
```

Downloads all files in the workflow in the zip file location specified by `--output`:

```bash
omics workbench workflows versions files --workflow=12345678910 1.0.0 \
  --output=output/all_files.zip
  --zip
```

Downloads all files in the workflow as a zip file named `12345678910-1.0.0-files.zip`in the folder location specified by `--output`:

```bash
omics workbench workflows versions files --workflow=12345678910 1.0.0 \
  --output=output/all_files
  --zip
```

Downloads all files in the workflow as a zip file named `12345678910-1.0.0-files.zip` in the current working directory:

```bash
omics workbench workflows versions files --workflow=12345678910 1.0.0 \
  --zip
```

## Positional Arguments

### `VERSION_ID`

**Required**. Specify a version identifier (`VERSION_ID`) to retrieve the files corresponding to the workflow's specific version.

## Flags

### `--workflow`=`WORKFLOW_ID`

**Required**. Specify the UUID of the workflow for which you want to describe versions.

### `--path`=`PATH`

The path for the specific file in the workflow that is to be printed to the screen or downloaded.

### `--output`=`PATH`

The location where a workflow file or files will be downloaded. Note: if `--path` is not specified (i.e. you are downloading multiple files) then `--output` must end with a folder and not an existing file name.

### `--zip`

If specified, the file(s) will be downloaded as into a zip file. Note: if `--output` is not specified or does not end with a zip file, then it will create a zip file with the naming convention `{workflow_name}-{workflow_version}-files.zip`.
