-------------------------------------------------------------------------------
help for cc                                                     Nicholas Winter
-------------------------------------------------------------------------------

Utility to automate changing directories

cc

cc code

cc cur new_code

cc drop existing_code

Description

cc automates the process of changing directories within Stata. The command allows you to build a database of commonly-used directory paths, and to associate a short mnemonic code with each.

Typing cc by itself displays a list of mnemonics and the associated directories. You can then click on a mnemonic code to change the current Stata system directory to the associated directory.

cc code changes the current Stata system directory to the directory associated in the database.

cc cur code adds the current directory to the database, and associates the mnemonic code with it.

cc drop code drops the specified mnemonic from the database.

cc uses the file command to create a file called directoryfile.txt in your personal ado directory (see adopath), containing the mnemonics and associated directory paths. The file command appeared as part of an update to Stata 7, so be sure your Stata is up-to-date.

Examples

. cc

bowling U:\nwinter\marketing\Putnam\bowlingdata brrsims U:\nwinter\StataData\brrsims ccd c:\usrdata\ccd nascar c:\usrdata\nascar

cc code to change directories cc cur code to add current directory to database cc drop code to drop entry

. cc ccd c:\usrdata\ccd

Author

Nicholas Winter Cornell University nw53@cornell.edu

Acknowledgement

I have used code from Jeroen Weesie's qsort command for sorting the database. Thank you Jeroen!