Announcement

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

  • Issue with running a do-file in STATA SE 18 for Mac IOS

    I recently got STATA 18 SE and facing the following issue: whenever I run a do-file, another do-file with the same name is created in the directory. For example, if I run the do-file setup.do it creates another file with the name ~setup.do.stswp in the folder. Any idea what is wrong?

  • #2
    Nothing is wrong. This is a new feature of the do-file editor in Stata version 18. It backs up your do file periodically while you are editing it. The backup is saved as an .stswp file. You can modify the interval between backups, or suppress them altogether if you wish. To do so, select Preferences from the Edit drop-down menu. In the Open and Save panel you will find "Backup modified documents:" and open the drop-down menu that lets you set the interval--one of the options is Never.

    This feature is one that some users had requested in the Wish List thread. On the other hand, you are not the first to post here expressing surprise. And I recall at least one post from a user who really was unhappy with it and didn't realize you can turn it off. I'm ambivalent about it myself. I don't experience many crashes with either Stata or my OS, and the backup files do tend to clutter up my already busy directories. On the other hand, two days ago, my computer overheated and, without warning, shut down. I was really pleased to only have lost one line of a fairly large, complicated do-file I was editing when that happened. Without that backup, I would have lost several hours of work.

    Comment


    • #3
      This is an automatically created backup file. You can disable this behaviour by going into the do file editor settings, I believe.

      Comment


      • #4
        Clyde Schechter: Thanks for getting back and providing the steps to disable it. It worked.

        Comment


        • #5
          Originally posted by Clyde Schechter View Post
          Nothing is wrong. This is a new feature of the do-file editor in Stata version 18. It backs up your do file periodically while you are editing it. The backup is saved as an .stswp file. You can modify the interval between backups, or suppress them altogether if you wish. To do so, select Preferences from the Edit drop-down menu. In the Open and Save panel you will find "Backup modified documents:" and open the drop-down menu that lets you set the interval--one of the options is Never.

          This feature is one that some users had requested in the Wish List thread. On the other hand, you are not the first to post here expressing surprise. And I recall at least one post from a user who really was unhappy with it and didn't realize you can turn it off. I'm ambivalent about it myself. I don't experience many crashes with either Stata or my OS, and the backup files do tend to clutter up my already busy directories. On the other hand, two days ago, my computer overheated and, without warning, shut down. I was really pleased to only have lost one line of a fairly large, complicated do-file I was editing when that happened. Without that backup, I would have lost several hours of work.
          can you help i am unable to acces this back up file is there anything i can do to be able to open it on my side?

          Comment


          • #6
            Open it with any text editor. If you try to open the original file with the Stata do editor it will prompt you to open that file or the backup if one is found.

            Comment


            • #7
              I am unable to find where to edit this Preference in my version: Stata/MP 18.0 for Windows.
              Sorry if I am overlooking it -- which menu is it supposed to be in?

              I do not really mind the backup files, but it seems like Stata might not be deleting them if the do-file is successfully closed properly, as I would expect.
              Instead it seems that the backups persist and I am prompted a lot whether to open the original or the backup, even when just starting out for the day. (This actually ends up making me wonder if I forgot to save my work or something happened. )

              Thanks

              Comment


              • #8
                Open the do-editor. Open the Edit drop down menu and select Preferences. Go to the Advanced tab. About 1/4th of the way down the window you will see
                "Back up modified documents:" with a drop-down menu below it. Open that drop-down menu and select Never (at the bottom).

                Comment

                Working...
                X