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

st: Re: truncate folder path in Stata 7?

From   "Michael Blasnik" <>
To   <>
Subject   st: Re: truncate folder path in Stata 7?
Date   Tue, 9 Dec 2003 15:50:32 -0500

I'm not sure what the problem is -- you can just use relative paths within
the do file, without ever referencing all of the lower levels of the path.
For example you can :

use myfile


use dataset1\myfile


use ..\myfile

to identify files you want to use (or with any other command referencing a
file).  You never need to spell out the whole path.

Michael Blasnik

----- Original Message ----- 
From: "Dietrich Drüner" <>
To: <>
Sent: Tuesday, December 09, 2003 2:59 PM
Subject: st: truncate folder path in Stata 7?

> Dear Statalisters,
> how can I truncate the first levels of the folder path where I want to
load or save datasets in Stata 7 (for Windows)?
> I am using Stata on two different computers with a very similar folder
structure. It looks about like: "...\MyFiles\Dissertation\dataanalysis\.."
> but the first three or four path levels are different due to the folder
structure of the operating system.
> I remember that in an older version (4 or 5) of Stata there was a simple
command that made Stata search for the appropriate path. But I can't find
anything in the help files or at
> It's always a dull work to change all do-files that I have saved on the
other computer when I want to use them on the second.
> Thank you!
> Dietrich.

*   For searches and help try:

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