Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: I use different computers and lost track of my files

From   "Richard Atkins" <>
To   <>
Subject   Re: st: I use different computers and lost track of my files
Date   Mon, 30 Oct 2006 11:29:38 +0000

I don't know if it works on Macs but I have the same problem working on
multiple PC's, using remote access, using a pen drive etc.
A solution to this is to use what Microsoft used to call the
'document-centric' approach.

My file contains the line ... global LOCALDIR: pwd

I load up do files by navigating to them in windows then right clicking
and clicking on the 'Edit' command. This has been set up (using Tools,
Folder Options, File Types) as a file association that uses the command
... "S:\Apps\Stata 9\wstata.exe" do "%1" (in fact I think Stata may set
this file association up on installation).

If all my do files start with the line -cd "$LOCALDIR"- I can open dta
files in the same folder as the do file with the -use- command and the
file name alone.
For more complex projects, all the paths become relative paths so you
can pick up a project folder (and all it's subfolders) and move it
elsewhere without breaking any of the links between files.

This is a similar approach to some other suggestions involving
'' but has the flexibility that the absolute path is never
typed in anywhere and never needs to be edited.

Richard A. 

>>> Oleksandr Shepotylo <> 30/10/2006 10:48 >>>
Hi dear statalist users,

I am using a flash drive with stata files on it. When I move from one 
computer to another computer,  flash drive can change the name from,
example, "I:\" to "G:\" and I have to edit my files.
Is there a way to say to Stata the letter where the flash drive is 
located and put that letter in a macro that can be later used in my 

More generally, any tips on how to organaze the workflow when you move

from one workplace to another?


Oleksandr Shepotylo
*   For searches and help try:
*   For searches and help try:

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