3

This answer: https://mathematica.stackexchange.com/a/201726/62529 allows downloads of all files from wolfram cloud. However, it does not preserve the folder tree.

I have a lot of files I want to download and they have folders nested within folders. These folders make it painful to have to reorganize all my files after downloading.

How can I download everything and not loose my folder organization?

I tried modifying the code (I linked to earlier) by changing Information[#, "DisplayName"] to Information[#, "Path"], but this gave me errors

localBackupPath = "C:\\Users\\username\\Desktop\\WolframBackup";
objects = CloudObjects@CloudDirectory[]
type = Information[#, "FileType"] & /@ objects;
allObjects =
    Flatten[MapThread[
        If[#2 === Directory, 
            CloudObjects[#1], #1] &,
            {objects, type}]];
CopyFile[#,
    FileNameJoin[{localBackupPath,
        Information[#, "Path"]}]] & /@ allObjects
ions me
  • 881
  • 5
  • 11
  • Probably because the destination directories do not exist so CopyFile fails. – Rohit Namjoshi Feb 02 '22 at 16:57
  • 1
    Am I to understand that in order to import your cloud scripts to run on your desktop, you need to write a program to do the import? That this isn't supported directly by either wolfram cloud or Mathematica? – James Bowery May 31 '22 at 15:54
  • 1
    That's correct. Wolfram cloud has a button to download them one by one, but not everything at once. – ions me Jun 03 '22 at 04:57

0 Answers0