Dos - Cd (CHDIR) - (Current|Working) directory

Card Puncher Data Processing

About

Cd is a command that:

More: the online help can be read by typing:

cd /?

Syntax

CHDIR [/D] [drive:][path]
CHDIR [..]
CD [/D] [drive:][path]
CD [..]

where:

  • .. is the parent directory.
  • the D switch change the current drive in addition to changing the current directory for a drive.

How to

display the current directory

Type CD without parameters to display the current drive and directory.

cd

get the current directory

SET WORKING_DIR=%cd%

Command Extensions

If Command Extensions are enabled CHDIR changes as follows:

Path case

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.

Spaces are not delimiters

CHDIR command does not treat spaces as delimiters, 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.





Discover More
Card Puncher Data Processing
Dos - Command

A command is: a Dos command (See below). of an utility. The DOS command are extended with management tools located in C:\Windows\System32...
Cmd Dos Startup Run
Dos - Startup Script

When Cmd starts, if /D is NOT specified on the command line, then it looks for the following REG_SZ/REG_EXPAND_SZ registry variables, and if either or both are present, they are executed first. and/or...
Undraw File Manager Re Ms29
File - Change Directory (cd)

Cd is a function or utility that changes the current directory (working directory). bash dos This function implements the resolve function with the first argument being the absolute...
Undraw File Manager Re Ms29
What is the working or current directory ?

The current or working directory is the directory where all relative directories are calculated



Share this page:
Follow us:
Task Runner