Announcement

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

  • STATA 18 SE Working Directory Issue

    I am having trouble setting current working directory in STATA 18 SE. I start by setting the current working directory using cd. The project folder has one do-file i.e. run.do and one folder i.e. analysis. In the analysis folder, I have multiple do-files. The run.do do-file runs the entire analysis. The problem is if I set current working directory to /project and then open any do-file in the analysis folder, the working directory changes to /project/do_files folder. I used to follow the same structure in STATA 17 and everything worked perfectly fine.

  • #2
    Hi, Moshin. We are always eager to help. However, it will be challenging to provide you with any meaningful suggestions or tips without specific information/details. Your description is a bit vague.

    Comment


    • #3
      The behaviour changed for Macs in a 10 Jan 2023 update to Stata 17:

      (Mac) Double-clicking on a do-file from the Finder to open it in the Do-file Editor will now also change Stata's working directory to the directory where the do-file is located.
      (see help whatsnew17)

      This makes it consistent with what happens when you double-click on Stata data files in the Finder.

      I'm not sure if there is a way to change this behaviour.

      Comment


      • #4
        Tiago Pereira: Apologies for the vague description. The problem is correctly stated by Hemanshu.

        Comment

        Working...
        X