Uploading folder within a hierarchical structure

Natalie Delpratt

I had a quick question on how to retrieve a specific folder within a hierarchical structure to upload into JupyterLab. For example, I have my top folder called Group 1, then a subfolder called Subject1, then within that I have 8 folders. If I just want to upload Group1/Subject1/Folder5 (all contents) is there a way/a code I can adapt so that when uploaded it still retains the Subject1/Folder 5 structure?

Thank you for your response!

Comments

2 comments

  • Comment author
    Harvey B The helpers that keep the community running smoothly. UKB Community team Data Analyst

    Hi,

    To maintain the file path when downloading from the project into the instance, you can run:

    dx download Group1/Subject1/Folder5 -r --path Group1/Subject1/Folder5/ -p

    Alternatively, you could download the entire Group1 folder and preserve its structure. This approach requires less coding, but could take significantly longer if there is a large amount of data.

    For more information, please refer to the dx commands documentation, specifically the sections on dx upload and dx download.

    I hope this was useful!

    0
  • Comment author
    Natalie Delpratt
    • Edited

    Hi Harvey,

    Thanks so much for that quick response! I tried that on Jupyter lab and it seems that I get an error on the “ --path” part of the command. Following the link you posted. --path and -p only appear to be arguments in dx upload and not in the options for dx download. Would the only way be then the second suggestion downloading the entire Group1 folder? I uploaded the error above

    Thanks again for your help!

    0

Please sign in to leave a comment.