|Purpose:||Display, add to, clear, or read the directory history list|
|Format:||DIRHISTORY [/= /A directory /F /G /GL /L /LL /M /N /P /R filename /Tn]|
The name of a directory to be added to the directory history.
The name of a file containing entries to be added to the directory history.
See also: HISTORY.
Supports command dialog.
File Completion Syntax:
The default filename completion syntax is: [/a] dirs [/r] * [1*] dirs
Every time you change to a new directory or drive, TCC saves the previous directory in an internal directory history list. The directory history window allows you to use the list to return to a previous directory. See also: directory navigation.
The DIRHISTORY command lets you view and manipulate the directory history list directly. If no parameters are entered, DIRHISTORY will display the current directory history list:
With the options explained below, you can clear the list, add new directories to the list without changing to them, save the list in a file, or read a new list from a file.
The number of directories saved in the directory history list depends on the length of each directory name. The list size can be specified at startup with the Directory History Buffer Size configuration option. The default size is 4,096 characters.
Your directory history list can be stored locally (a separate list for each copy of TCC) and/or globally (all copies of TCC share the same list). For details see the discussion of local and global history lists. If you use global lists, SHRALIAS can save the list when no copy of TCC is active, as long as you do not restart Windows.
NOTE: TCC as of version 26 supports simultaneous local and global directory history lists. This is for advanced users only; it is not generally recommended to have both types. If you have only a local directory history list or only a global directory history list, directory history recall will work the same as in previous versions. If you have both local and global directory history lists, searching backwards through the directory history will first search the local list. If you reach the beginning of the local list, the next directory history entry returned will be from the end of the global list. If you search forwards through the global list, when you reach the end the next directory history entry returned will be the beginning of the local list. If you try to go beyond the beginning of the global list or the end of the local list TCC will beep.
When displaying, creating or deleting directory history entries, you can specify which list you want DIRHISTORY to search with the /GL or /LL options. When searching the directory history, TCC will look first in the local list (if it exists), and then in the global list (if it exists).
If you use the /G option to convert a local directory history list to a global directory history list, DIRHISTORY will not do the conversion if a global directory history list already exists (for example, in another TCC session or in SHRALIAS).
You can save the directory history list by redirecting the output of DIRHISTORY to a file. This example saves the history to a file called DIRHIST and reads it back again.
dirhistory > dirhist
dirhistory /r dirhist
Because the directory history stores each name only once, you don't have to delete its contents before reading back the file unless you want to delete the directories that were visited by the intervening commands.
TCC can also load and save the history list automatically if you use the Directory History File configuration option.
|/=||Display the DIRHISTORY command dialog to help you set the filename and command line options. The /= option can be anywhere on the line; additional options will set the appropriate fields in the command dialog.|
|/G||Switch from a local to a global directory history list. If you already have a global directory history list (for example, in another TCC instance or in SHRALIAS), DIRHISTORY will not do the conversion.|
|/GL||Read from and write to the global directory history list. If you have both local and global lists defined and do not specify /GL, DIRHISTORY will default to using the local list.|
|/P||Wait for a key after displaying each page of the list. Your options at the prompt are explained in detail under Page and File Prompts.|
|/R||Read the directory history from the specified file and append it to the list currently held in memory.|