Utility to automate changing directories
cc cur new_code
cc drop existing_code
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.
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
Nicholas Winter Cornell University firstname.lastname@example.org
I have used code from Jeroen Weesie's qsort command for sorting the database. Thank you Jeroen!