0% found this document useful (0 votes)
2 views4 pages

Dos Command

The document provides a brief overview of various command-line commands used for file and directory management, including MKDIR for creating directories, CD for changing directories, and RMDIR for removing directories. It also covers commands for copying files (COPY and XCOPY), moving files (MOVE), deleting directories (DELTREE), and managing file attributes (ATTRIB). Additionally, it mentions the TREE command for displaying the directory structure graphically.

Uploaded by

kcec2077
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views4 pages

Dos Command

The document provides a brief overview of various command-line commands used for file and directory management, including MKDIR for creating directories, CD for changing directories, and RMDIR for removing directories. It also covers commands for copying files (COPY and XCOPY), moving files (MOVE), deleting directories (DELTREE), and managing file attributes (ATTRIB). Additionally, it mentions the TREE command for displaying the directory structure graphically.

Uploaded by

kcec2077
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

MKDIR (make directory)

Creates a directory.

SYNTAX

MKDIR [drive:]path
MD [drive:]path
EXAMPLES

md test - Creates a directory called test inside the


current directory.

CD (change directory)
Changes the current directory

SYNTAX

CD [drive:][path]
CD[..]
EXAMPLES

cd \ - Changes current directory to the highest level of


the current drive (the root directory).
cd .. - Goes up one directory. For example if you are
within the C:\WINDOWS\COMMAND> directory this
would take you to C:\WINDOWS>

RMDIR (remove directory)


Removes (deletes) a directory.

SYNTAX

RMDIR [drive:]path RD [drive:]path


EXAMPLES
rmdir c:\test - Removes the test directory if empty.

COPY
Copies one or more files to another location.
SYNTAX
XCOPY
Xcopy is a powerful version of the copy command with
additional features. It has the ability to move files,
directories and even whole drives from one destination
to another. It also can preserve file attributes and long
file names.
MOVE
Moves files and renames files and directories.

SYNTAX

To move one or more files: MOVE [/Y | /-Y] [drive:]


[path]filename1[,...]destination
DELTREE
Deletes a directory and all the subdirectories and files in
it.

ATTRIB
Displays or changes file attributes such as read only,
hidden, system, and archive. Attrib is necessary to use
most other commands that do not work when some of
these attributes are set.
SYNTAX

ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] [[drive:]
[path]filename] [/S]
+ Sets an attribute.
- Clears an attribute.
R Read-only file attribute.
A Archive file attribute.
S System file attribute.
H Hidden file attribute.
/S Processes files in all directories in the specified path.
Tree command
Graphically displays the directory structure of a drive or
directory.
Syntax:
C:\>tree directory name

You might also like