Move data to Google Drive

please yaw i have been hired as Data Manager and i am using ODK to collect data on a daily bases and the study has been going on for a year now and odk folders stored on a hard drive. i was asked to pull all the data from the beginning of the study and host it on google drive. how can i go by it considering i have more than 100 odk folders on the hard drive. is there a way i can pull them simultaneously.

Hi, @Dada!

While @yanokwa can read and suggest something, I think you could use Briefcase CLI for that. The high level steps would be:

  1. Pull forms from all the odk locations
  2. Extract forms to CSV format
  3. Upload the csv files to Google Drive

I suggest you write a script that deals with all the CLI operations. Here's an example of how would such a script look like for Windows:

echo "Pulling ODK folders"
java -jar briefcase.jar -pc -od {PATH_TO_ODK_FOLDER_1} -sd {PATH_TO_STORAGE_DIR}
java -jar briefcase.jar -pc -od {PATH_TO_ODK_FOLDER_2} -sd {PATH_TO_STORAGE_DIR}
java -jar briefcase.jar -pc -od {PATH_TO_ODK_FOLDER_3} -sd {PATH_TO_STORAGE_DIR}
java -jar briefcase.jar -pc -od {PATH_TO_ODK_FOLDER_100} -sd {PATH_TO_STORAGE_DIR}

echo "Extracting forms"
java -jar briefcase.jar -e -ed {PATH_TO_TARGET_OUTPUT_DIR} -f {OUTPUT_FILE_NAME} -id {FORM_ID_1} -sd  {PATH_TO_STORAGE_DIR}
java -jar briefcase.jar -e -ed {PATH_TO_TARGET_OUTPUT_DIR} -f {OUTPUT_FILE_NAME} -id {FORM_ID_2} -sd  {PATH_TO_STORAGE_DIR}
java -jar briefcase.jar -e -ed {PATH_TO_TARGET_OUTPUT_DIR} -f {OUTPUT_FILE_NAME} -id {FORM_ID_3} -sd  {PATH_TO_STORAGE_DIR}
java -jar briefcase.jar -e -ed {PATH_TO_TARGET_OUTPUT_DIR} -f {OUTPUT_FILE_NAME} -id {FORM_ID_N} -sd  {PATH_TO_STORAGE_DIR}

You would have to replace all the values between {} with the actual places/names/formIds you want to process.

The first block of lines would pull each of the ODK Collect folders in your hard drive
The second block of lines would export each of the forms in all the combined ODK Collect folders you have pulled

The script for linux/mac would be the same but with this line as the first line:


@ggalmazor's solution is a fine one if you need to do this on a regular basis.

If you just need to do this for data from the beginning of the study, then you can use Briefcase's graphical user interface (not the command line interface) to pull all the forms, extract to CSV, then upload to wherever.

2 posts were split to a new topic: How to use media in forms