Download REDCap v7 Files

Users may request files to be recovered from a REDCap v7 project. These files are stored in an Azure File Share and can be accessed via the various Azure tools. An easy way to download all files for a given project is to use the az CLI tool. Here is an example of downloading all files for project 3987 into a local rc_files folder in your home folder.

az storage file download-batch --destination ~/rc_files --source "i2-redcap7-prod-fileshare" --account-name "i2redcap7prodstorage" --pattern "redcap_uploads/prod/*_pid3987_*"

Note

You will need to authenticate using az login or provide a key argument for the az storage command.

Helper Script

This script should work on macOS and Linux based systems using bash. Follow these steps to use this script:

  1. Copy the following code to a new file on your computer named download_files.sh.
  2. Allow the file to be executed by running this command chmod +x download_files.sh.
  3. Change the PID value to the v7 project ID you would like to download.
  4. Execute the script ./download_files.sh.
#! /bin/sh

PID=3987
OUTPUT_FOLDER="~/rc_files_$PID"

az storage file download-batch --destination "$OUTPUT_FOLDER" --source "i2-redcap7-prod-fileshare" --account-name "i2redcap7prodstorage" --pattern "redcap_uploads/prod/*_pid$PID_*"

Note

Optionally, you may also change the OUTPUT_FOLDER path to a different folder if you prefer.

See Also

az storage CLI


Updated on August 7, 2025