|
K
E
Y |
Common Commands |
INTERNAL |
External |
/SWITCH |
Parameter |
Help text |
AddonTool |
|
Mounted Commands |
.Mount/\Command |
CmdShorthand |
#Constant |
$FUNCTION |
:Procedure |
!GuardNote |
|
Operating Systems |
NT/2K/XP/K3 |
NT Only |
NT/2K |
2K Only |
2K/XP |
XP Only |
XP/K3 |
K3 Only |
2K/XP/K3 |
Related Resources from the NT/2K/XP/K3 Command Library
|
Resource |
|
Short Description |
|
.ListCD |
|
Display current directory of all accessible local and network drives. |
|
.GetCD |
|
Displays the current directory -AND- updates #cd |
|
#cd |
|
Current directory (consistent across NT/2K/XP/K3) |
Go straight to !GuardNotes. (updated
2004-07-13)
This is the Mounted Help Text. We also archive the Common Help Text
for NT,
2K, XP and
K3
Description
Displays the name of or changes the current directory.
Syntax
|
CHDIR |
|
[/D]
[drive:][path] |
|
CHDIR |
|
[..] |
|
CD |
|
[/D]
[drive:][path] |
|
CD |
|
[..] |
Parameters and Switches
|
.. |
|
Specifies that you want to change to the parent directory. |
|
/D |
|
Change current drive in addition to changing current directory for a drive. |
Type CD drive: to display the current directory in the specified drive.
Type CD without parameters to display the current drive and directory.
Use the /D switch to change current drive in addition to changing current directory for a drive.
Examples, Notes and Instructions
If Command Extensions are enabled CHDIR changes as follows:
The current directory string is converted to use the same case as the on disk names. So CD C:\TEMP would actually set the
current directory to C:\Temp if that is the case on disk.
CHDIR command does not treat spaces as
delimeiters, so it is possible to CD
into a subdirectory name that contains a space without surrounding the name with quotes. For example:
CD \winnt\profiles\username\programs\start menu
is the same as:
CD "\winnt\profiles\username\programs\start menu"
which is what you would have to type if extensions were disabled.
GuardNotes
Things that are different (by design, by accident or otherwise)
%cd% variable not present in Windows NT
An internal variable called %CD% stores the current directory in 2K/XP/K3. Since this value is NOT PRESENT in
Windows NT, we suggest that you code your scripts using the Library Constant %#cd%,
which is CONSISTENT across NT/2K/XP/K3.
|