Sideway
output.to from Sideway
Draft for Information Only

Content

MS DOS Command: CD (CHDIR)
  Description
  Syntax
  Parameters
  Remarks
   Changing to the root directory
   Using the current directory from a different drive
   Changing the directory on another drive
  Examples

MS DOS Command: CD (CHDIR)

Reference from Microsoft MS-DOS cmd help

Description

Displays the name of the current directory or changes the current directory.

Syntax

CD [drive:][path]

CD[..]

CHDIR [drive:][path]

CHDIR[..]

To display the current drive letter and directory name, use either of the following syntax lines:

CD

CHDIR

Parameters

[drive:][path] Specifies the drive (if other than the current drive) and directory to which you want to change.
.. Specifies that you want to change to the parent directory.

Remarks

Changing to the root directory

The root directory is the top of the directory hierarchy for a drive. To return to the root directory, type the following command:

cd \

Using the current directory from a different drive

If you are working in the \PUBLIC\JONES directory on drive C and you change to drive D, you can copy files to and from the \PUBLIC\JONES directory by specifying only the drive letter C.

Changing the directory on another drive

You can change the current directory on another drive by specifying the drive letter on the command line when you use CHDIR or CD.

Examples

Either of the following commands changes your current directory to the directory named PRIMETIM:

chdir \primetim

cd \primetim

Suppose you have a directory named SPECIALS with a subdirectory named SPONSORS. To change your current directory to \SPECIALS\SPONSORS, type the following command:

cd \specials\sponsors

Or, if your current directory is \SPECIALS, you can use the following command to change to the \SPECIALS\SPONSORS directory:

cd sponsors

To change from a subdirectory back to the parent directory, type the following command:

cd..

To display the name of the current directory, you can use CHDIR or CD without a parameter. For example, if your current directory is \PUBLIC\JONES on the disk in drive B, type CHDIR to see the following response:

B:\PUBLIC\JONES

If you are working on drive D and you want to copy all files in the \PUBLIC\JONES and \PUBLIC\LEWIS directories on drive C to the root directory on drive D, type the following commands:

chdir c:\public\jones

copy c:*.* d:\

chdir c:\public\lewis

copy c:*.* d:\

If, instead, you want to copy all files in the \PUBLIC\JONES and \PUBLIC\LEWIS directories to your current location on drive D, type the following commands:

chdir c:\public\jones

copy c:*.* d:

chdir c:\public\lewis

copy c:*.* d:

For more information on copying files, see the COPY command.


©sideway

ID: 110700138 Last Updated: 7/21/2011 Revision: 0


Latest Updated LinksValid XHTML 1.0 Transitional Valid CSS!Nu Html Checker Firefox53 Chromena IExplorerna
IMAGE

Home 5

Business

Management

HBR 3

Information

Recreation

Hobbies 8

Culture

Chinese 1097

English 339

Travel 18

Reference 79

Computer

Hardware 254

Software

Application 213

Digitization 37

Latex 52

Manim 205

KB 1

Numeric 19

Programming

Web 289

Unicode 504

HTML 66

CSS 65

SVG 46

ASP.NET 270

OS 431

DeskTop 7

Python 72

Knowledge

Mathematics

Formulas 8

Set 1

Logic 1

Algebra 84

Number Theory 206

Trigonometry 31

Geometry 34

Coordinate Geometry 2

Calculus 67

Complex Analysis 21

Engineering

Tables 8

Mechanical

Mechanics 1

Rigid Bodies

Statics 92

Dynamics 37

Fluid 5

Fluid Kinematics 5

Control

Process Control 1

Acoustics 19

FiniteElement 2

Natural Sciences

Matter 1

Electric 27

Biology 1

Geography 1


Copyright © 2000-2025 Sideway . All rights reserved Disclaimers last modified on 06 September 2019