How to add a Stata Batch command to the DO file context menu

 

I made this web page primarily so I would remember how to do this when I get a new computer down the road.

If this helps someone else, that is great.

 

In any folder, click “Tools” => Folder Options

 

 

Then click on the “File Types” tab

 

 

Then find “DO” file and highlight and click the “Advanced” button

 

 

 

Click “New…”

 

 

Type “batch” in the Action: box

Type C:\Stata8SE\wsestata.exe /m200 /s  do "%1" in the Application used… box

“ /m200” sets the memory to 200MB and “ /s” specifies that the log is smcl

 

 

when done, click ok as many times as needed to close all of the boxes.

 

Now find a DO file and right-click, there should be a batch option now.