Announcement

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

  • Do file disappeared

    Hi,

    My do file has been disappeared. I have the portion of the log file starting with

    do "/var/folders/qr/kccf87_1155__r1t86kb8kwh0000gp/T//SD00333.000000"

    I am 100% sure that I have not deleted my .do file but my computer was giving a "your start updisk full error". Is there any way that this could be recovered. I have run the following but I do not know how can I reach these temporary files.

    . display "`findout'"
    /var/folders/qr/kccf87_1155__r1t86kb8kwh0000gp/T//S_00460.000001

    Thanks in advance,
    Nazlı




  • #2
    I can't follow this at all. If you had some file created by Stata that was temporary, it's probably gone for good. If you created a file otherwise yourself, it will be somewhere on your computer, probably. Stata tends to leave such files as created. Why you have a do file with such a name is not clear.

    Comment


    • #3
      I am going to hazard a guess that you are using Stata on a Macintosh running OS X, that you were creating your do-file in the do-file editor, you were running it using the "do" button in the editor, and that you had not saved it, or had made changes subsequent to the last time you saved it, at the time your system crashed. (Please read the FAQ linked to at the top of this page for guidance on the sort of information you should provide when submitting questions to Statalist.) Everything following is based on those assumptions; it may not be true for Windows or Linux versions of Stata.

      When you run a do-file with unsaved changes, the do-file editor creates a temporary file containing your do-file for Stata to read and run. (If you saved an earlier version, the earlier version should still exist where you saved it.) If you had saved it after making the most recent changes, Stata would have run the saved file rather than create a temporary file.

      OS X hides system directories like "/var" from routine access by the user. Outside of Stata, click on your desktop to bring up Finder, and from the Go menu choose "Go to Folder..." and in the dialog box that opens, type "/var" and hit the "Go" button. A new Finder window will open starting in /var. From there you can navigate your way to the file shown in your log. If the file still exists (it's in the temporary file directory, so it quite possibly has been deleted by OS X as part of its routine housekeeping) you can drag it to the directory you are doing your work in, rename it to have an appropriate suffix, and open it in Stata.

      The takeaway from this is that it's best to save your do-file before running it from the do-file editor if the file is something of value.

      Comment


      • #4
        William's guesses look good to me.

        Comment


        • #5
          yes, that's correct. unfortunately it has been deleted. Thank you very much.

          Comment


          • #6
            Dear All,

            I have a little problem with one do file herein attached which is once opened it displays "NUL, and I am unable to solve the issue.
            Kindly is there any solution to retrieve the codes and fix the do file or it's lost for good?
            Thank you.
            NTM.do

            Comment

            Working...
            X