## zowe › zos-ftp › download › all-spool-by-jobid

Download all spool content for a job to files in a local directory by providing the job id

#### Usage

zowe zos-ftp download all-spool-by-jobid <jobid> [options]

#### Positional Arguments

- `jobid` (string)

  - The ID of the job for which you would like to list spool files

#### Options

- `--directory` | `-d` (string)

  - The local directory to save the spool content to. By default, it will be saved to "./output".

- `--omit-jobid-directory` | `--ojd` (boolean)

  - If you specify this, the job output will be saved directly to the specified (or default) directory. For example, if you omit this, the output would be saved to ./output/JOB00123. If you specify --ojd, the JOB00123 directory would not be included in the output path and the content would be saved to ./output.

#### FTP Connection options

- `--host` | `-H` (string)

  - The hostname or IP address of the z/OS server to connect to.

- `--port` | `-P` (number)

  - The port of the z/OS FTP server.

    Default value: 21

- `--user` | `-u` (string)

  - Username for authentication on z/OS

- `--password` | `-p` | `--pass` | `--pw` (string)

  - Password to authenticate to FTP.

- `--secure-ftp` (boolean)

  - Set to true for both control and data connection encryption, 'control' for control connection encryption only, or 'implicit' for implicitly encrypted control connection (this mode is deprecated in modern times, but usually uses port 990). Note: Unfortunately, this plugin's functionality only works with FTP and FTPS, not 'SFTP' which is FTP over SSH.

    Default value: true

- `--connection-timeout` | `--ct` (number)

  - How long (in milliseconds) to wait for the control connection to be established.

    Default value: 10000

#### TLS / Secure Connection options

- `--reject-unauthorized` | `--ru` (boolean)

  - Reject self-signed certificates. Only specify this if you are connecting to a secure FTP instance.

- `--server-name` | `--sn` (string)

  - Server name for the SNI (Server Name Indication) TLS extension. Only specify if you are connecting securely

#### Profile Options

- `--zftp-profile` | `--zftp-p` (string)

  - The name of a (zftp) profile to load for this command execution.

- `--base-profile` | `--base-p` (string)

  - The name of a (base) profile to load for this command execution.

#### Base Connection Options

- `--token-type` | `--tt` (string)

  - The type of token to get and use for the API. Omit this option to use the default token type, which is provided by 'zowe auth login'.

- `--token-value` | `--tv` (string)

  - The value of the token to pass to the API.

- `--cert-file` (local file path)

  - The file path to a certificate file to use for authentication.

    Note: The CLI does not support certificate files that require a password. For more information, search Troubleshooting PEM Certificates in Zowe Docs.

- `--cert-key-file` (local file path)

  - The file path to a certificate key file to use for authentication

#### Examples

- Download all spool for the job with the ID JOB00123 to the default subdirectory in the current directory:

  - `zowe zos-ftp download all-spool-by-jobid j123`

- Download all spool for the job with the ID JOB00123 to the directory build/job_output:

  - `zowe zos-ftp download all-spool-by-jobid j123 -d build/job_output/`