Announcement

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

  • Problem saving DO files

    Hello everyone,

    I am having an issue saving my DO files.

    Somehow, the files being saved are not in Stata Do file format but in some unknown format. All my Do files are being saved in the format of the names of the the Do files itself. Example, when I save a file named "basic", the format of the Do file is "basic" and of course, when I want to open the Do file, Stata does not locate it.

    How can I solve this problem?

    Can someone also tell me how to retrieve the Do files in the correct format?

  • #2
    It's hard to comment on your problem because you don't provide enough information. For example, what software are you using to create your do-files? Stata's built-in editor? A text editor (name?), or something like MS Word? How, precisely, are you attempting to save your files? Using a menu in your software? Using the command line, or ...? How, precisely, do you know that the files that you are creating are not in the "correct" format (by which I assume you mean a plain text file). How are you trying to open the file in Stata? etc etc.

    Comment


    • #3
      Sorry for not having mentioned the details earlier. Please find all the information below:

      Software used: Stata v.12, built-in editor for do-files

      Method: Using menu

      How I create do files: Open Stata -> new do-file editor -> type codes -> "save as" using drop down menu under file -> type file name and check for type, which is Do files (*.do)

      How I open do files: Open Stata -> new do-file editor -> click on open -> select file

      Using the above methods, the correct format of a file named abc, should be abc.do. Correct? However, the type of the file saved is .abc (not .do) and Stata does not open the file.

      Comment


      • #4
        I cannot reproduce what you describe. (Stata 14MP, Windows 7) You could do some trouble-shooting yourself to try and ascertain the problematic step. E.g. after step 1 of what you describe, navigate outside Stata to the relevant directory, and see what the name is of the file that has been created. If it's not what you expect, you know the problem is at step 1. If it is ok, then troubleshoot around the later steps, and so on.

        Comment


        • #5
          Bizarre. You shouldn't have to do this, but try deliberately tacking .do onto the end and wrapping the name of the file you want to save in quotation marks.

          Comment


          • #6
            This looks like a case for Stata tech support.

            Comment


            • #7
              Hi Delphina, I know that your post was 5 years ago, but I'm facing the exact same problem now, can you let me know how you managed to overcome it? Thank you!

              Comment

              Working...
              X