Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: Stata and WinEdt as text editor

From   "Michael Blasnik" <>
To   <>
Subject   st: Re: Stata and WinEdt as text editor
Date   Tue, 30 Sep 2003 10:10:26 -0400

You can get the current directory from:

local dir: pwd

or, in Stata 8 if you want to insert it right into the winexec command,
`:pwd' refers to the current path

you may need to use compound double quotes to make sure this deals with
spaces within directory names

Michael Blasnik

----- Original Message ----- 
From: <>
To: <>
Sent: Tuesday, September 30, 2003 9:48 AM
Subject: st: Stata and WinEdt as text editor

> Dear statalisters
> I am sorry if this is slightly OT. I would like to use my favourite Editor
> (WinEdt) for do-file editing. After having read
> , I wrote the
> program and stored it in an ado-file:
> program winedt
>        version 8
>        * discard
>        winexec "D:\Programme\WinEdt\WinEdt.exe" `*'
> end
> Now, typing
> - winedt -
> in Stata works fine, but when specifying a file name, like - winedt
>, winedt fails to look in the current Stata working directory
> myfile. Instead, it looks in the directory where WinEdt was opend last
> time, and fails to open If I specify the whole path to myfile,
> everything works fine, but it is more typing work each time.
> I could not change this behaviour from within WinEdt. Is there some way to
> modify the above program in such a way that on typing - winedt -,
> stata substitutes "current_working_dir\", and that specifying a
> file name at all is still optional?
> Thanks for any advice.
> Eva
> ____________________________________
> Eva Poen
> University of St. Gallen

*   For searches and help try:

© Copyright 1996–2022 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index