SpartaDOS X Reference Manual

The Command Processor — Commands




CHDIR (Change Directory) Command

Index


Purpose This command changes the current (working) directory on the specified drive, or displays the current directory path if no path is given.
 
Syntax CHDIR [d:][path]
 
Alias CD & CWD
 
Type Internal
 
Related MKDIR, RMDIR, PATH
 
Remarks   Directories (also called subdirectories or folders) are used like file folders to organize your files. They also make searching large storage areas (such as hard drives) much faster. In a file cabinet it is much quicker to go to a file folder and search through a few documents than a pile of all your documents. Computers work the same way. It is much quicker for DOS to go to a subdirectory and search through a few files than it is to search through one long file list. CHDIR allows you to move among your directories.

The current directory is where SpartaDOS looks to find files whose names were entered without specifying a directory. If you do not specify a drive, the default drive is assumed. If you enter the CHDIR command with no parameters, the current directory path of the current drive is displayed. (This mode is the same as the ?DIR command from SpartaDOS 3.2.)

Whenever SpartaDOS is re-initialized (i.e. RESET), the default directory on every drive is reset to the MAIN (root) directory. The default directory of a drive is also reset to the MAIN directory if the diskette has been changed.

This command has no effect on MYDOS diskettes even though subdirectories are supported. This is due to the fact that there is no foolproof way to detect a disk change on DOS 2 style diskettes (SpartaDOS diskettes have a volume names, a random number, and a write count for disk change detection — see "Technical Information").


Previous page

 Next page