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" <Richard.Atkins@lshtm.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
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 profile.do 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
'profile.do' but has the flexibility that the absolute path is never
typed in anywhere and never needs to be edited.

Richard A.

www.richardatkins.co.uk 



>>> Oleksandr Shepotylo <shepotil@econ.umd.edu> 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,
for 
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 
programms?

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

from one workplace to another?

Best

Oleksandr Shepotylo
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html 
*   http://www.stata.com/support/statalist/faq 
*   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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