Skip to content

The fw download Command

Sessions, acquisitions, and files can be downloaded individually using the fw download command.

Usage

fw download [-h] [--config-file CONFIG_FILE | --no-config] [-y] [--ca-certs CA_CERTS] [--timezone TIMEZONE] [--debug | --quiet] [-o [OUTPUT]] [-p PREFIX] [-i INCLUDE] [-e EXCLUDE] <source-path>

Required Arguments

Required Argument Description
source-path The location of the file on your Flywheel instance. For example [fw://group/project/subject/acquisition/attachments]

Optional Arguments

Download

For a full, up-to-date list of options, run the following from your command line:

fw download --help

Below is a list of commonly used options.

Optional Argument Description
-i FILE_TYPE, --include FILE_TYPE Download only files with the specified types.*
-e FILE_TYPE, --exclude FILE_TYPE Ignore files with the specified types.*
-o, --output file name Name of the folder where the data is downloaded
-p PREFIX, --prefix PREFIX Prefix for downloaded directory structure

* Learn more about file types in Flywheel

General

Optional Argument Description
-h, --help Show help message and exit.
-C PATH, --config-file Specify configuration options via config file.*
--no-config Do NOT load the default configuration file.
-y, --yes Assume the answer is yes to all prompts.
--ca-certs CA_CERTS Path to a local Certificate Authority certificate bundle file. This option may be required when using a private Certificate Authority.
--timezone TIMEZONE Set the effective local timezone to use when uploading data.
-q, --quiet Squelch log messages to the console.
-d, --debug Turn on debug logging.
-v, --verbose Get more detailed output.

* Learn more about how to create this file.

Example

Below is an example of how to download a particular subject:

  1. Download the Flywheel CLI, and sign in using your API key. Once signed in, the following message should appear:

    C02W39YBHTD6:~ AvaAnderson$ fw login staging2.dev.flywheel.io:Ja0ib***********pf
    You are now logged in as Ava Anderson!
    
  2. Now you can navigate to the files you wish to download. In this example, we're navigating to the subjects in the AnxietyStudy project:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    C02W39YBHTD6:~ AvaAnderson$ fw ls Psychology/AnxietyStudy
    admin **s13**
    admin **s3**
    admin **s5**
    admin **s11**
    admin **s14**
    admin **s15**
    admin **s12**
    admin Dec5 17:49files/license.txt 
    

    Tip

    If a project or subject's name includes spaces, use quotes around the name. For example: Psychology/"An example study"

  3. To download one of those subjects:

    1
    2
    3
    4
    5
    6
    C02W39YBHTD6:~ AvaAnderson$ fw download Psychology/AnxietyStudy/s3
    
    This download will be about 218 MB comprising 39 files.
    
    Continue? (yes/no): yes
    Wrote 218 MB to s3.tar