Introduction
Sessions, acquisitions, and files can be downloaded using the download
command in the Flywheel CLI.
Additional Download Options:
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>
Example
Below is an example of how to download a particular subject:
-
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!
-
Now one can navigate to the files they wish to download. In this example, we're navigating to the subjects in the
AnxietyStudy
project: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"
-
To download one of those subjects:
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
Reference
Required Argument |
Description |
---|---|
source-path |
The location of the file on your Flywheel instance. For example [fw://group/project/subject/acquisition/attachments] |
Optional Flags
For a full, up-to-date list of options, please run the following from your command line:
fw download --help
Below is a listing of commonly used options.
Optional flag |
Description |
---|---|
-e, --exclude file type |
Download everything but these file types. Learn more about file types in Flywheel. |
-y, --yes |
Assume the answer is yes to all prompts |
-h, --help |
Displays help for download |
-i --include file type |
Download only these file types. Learn more about file types in Flywheel. |
-o --output file name |
Name of the folder where the data is downloaded. |
-p PREFIX, --prefix PREFIX |
Prefix for downloaded directory structure |
-i INCLUDE, --include INCLUDE |
Download only these file types. For example dicom or nifti |
-e EXCLUDE, --exclude EXCLUDE |
Download everything but these file types. For example dicom or nifti |