Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Autosave DO file to Box drive

    I am using Stata 16.1 and have my settings on my DO files set to save anytime I run code. I have started using Box (cloud-based drive) for some of my datasets to save room on my hard drive, and to ensure they are backed up. Since I've upgraded from 15, I've noticed that I can no longer autosave my do files to my Box drive. Is there something I'm missing? If I move the do file to anywhere locally on my computer, it autosaves just fine. Please help!

    UPDATE: I will add that I can't just hit save on these files, either. I have to save as, then replace the original file.

  • #2
    You might check out Rclone (https://rclone.org/), and then you'd just need to add a shell command in your .do file to push to your Box folder.
    __________________________________________________ __
    Assistant Professor, Department of Biostatistics and Epidemiology
    School of Public Health and Health Sciences
    University of Massachusetts- Amherst

    Comment


    • #3
      I'm not really sure how to do that.

      Comment


      • #4
        Originally posted by amandacpac View Post
        I'm not really sure how to do that.
        You'll need to install RClone and then do the setup for your Box account; tutorial here (https://rclone.org/box/)

        Rclone calls your external folders like Box "remotes" so let's say your call yours "My_remote"

        then in your do file, something like this (assuming C: drive)

        Code:
        save MyFolder/Myfile.do
        shell C: && "C:/Program Files/RClone" && rclone copy C:MyFolder/Myfile My_remote:Folder/Myfile.do &&
        msg console "Your upload completed."
        ** For Mac last line would be: osascript -e 'display notification "Your upload completed." with title "Box/Rclone"'
        Last line isn't required but helpful.
        Last edited by Andrew Lover; 20 Sep 2020, 20:43.
        __________________________________________________ __
        Assistant Professor, Department of Biostatistics and Epidemiology
        School of Public Health and Health Sciences
        University of Massachusetts- Amherst

        Comment

        Working...
        X