Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Scott Merryman <scott.merryman@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: Forcing absolute file paths in output |
Date | Tue, 13 Aug 2013 11:53:47 -0500 |
Using c(pwd) and r(fn) from -graph describe- you can most of it: graph export "Graph.pdf", as(pdf) replace qui graph describe Graph disp "(file `=c(pwd)'/`=r(fn)'.pdf written in PDF format)" Scott On Tue, Aug 13, 2013 at 10:13 AM, Nick Cox <njcoxstata@gmail.com> wrote: > I think the short answer is No. > > But you could always spell out the full path within your command. > > I guess you don't want to do that, but the only alternative I can > think of is writing a program to emit a local macro that cuts down on > typing. > > Nick > njcoxstata@gmail.com > > > On 13 August 2013 16:03, Martin Rune Hansen <martinrunehansen@gmail.com> wrote: >> Dear all >> >> Is there a way to force Stata to always write abolute file paths in >> the output panel? For exsample, if I export a graph I want Stata to >> output >> >> (file C:\Users\myuser\Documents\Graph.pdf written in PDF format) >> >> instead of >> >> (file Graph.pdf written in PDF format) >> >> I realize that I can make Stat write the full path if I myself specify >> an absolute path, but that is not what I am after. I want to be able >> to type commands using relative paths and have Stata respond with the >> absolute path. Is this possible? Thank you in advance. >> >> Regards, >> Martin Hansen * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/