Statalist The Stata Listserver


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

Re: st: AW: Changing working directory permanently


From   "Sergio Correia" <[email protected]>
To   [email protected]
Subject   Re: st: AW: Changing working directory permanently
Date   Wed, 27 Dec 2006 23:47:25 -0500

Hello everyone,

For those that change their working directory a lot (and thus tend to
change their profile.do file), this ADO may be useful:

Name of program: cdp_beta
(It's like "cd" but permanently, therefore cdp ... ok the name is not that good)
(as seen in the name, this is a beta version)

Function: To change or create the profile.do file, so a default
working directory can be added (or removed).

Location:
http://stata.googlecode.com/files/cdp_beta.ado

Usage:
cdp_beta
When the cmd has been issued alone, with no arguments, it will try to
find the current default working dir.

cdp_beta dirname
Will change the default working directory to dirname, and create a
profile.do if necessary.
Example: cdp_beta "C:\My data"

cdp_beta, clear
Will remove any default working directory from profile.do

Suggestions are very welcome, specially regarding the style / syntax / usage.

By the way, the program tries to be careful with what you have in the
dofile. It basically adds a -cd "yourpath"- line at the end of the
program (or before the first -exit- line), and removes all previous cd
lines. Also, more options could be included to change other common
lines in the profile.do (like -set mem-).

Cheers,

Sergio

On 12/27/06, Thomas Erdmann <[email protected]> wrote:
In the main Stata folder (for my part ...\Stata9 ), create a file called
" profile.do ".Stata will execute this dofile with every startup. Here you
can include any commands e.g.

set memory 400m
cd d:\statadata
adopath + d:\statadata\adofiles


- Tom






-----Urspr�ngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Claude
Francoeur
Gesendet: Mittwoch, 27. Dezember 2006 18:00
An: [email protected]
Betreff: st: Changing working directory permanently

Hello,

Doing the command "cd" is modifying the working directory temporarily. How
can it be modified permanently?

Thanks,

Claude

*
*   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/

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index