Color Command

Sets the default console foreground and background colors.

Syntax:

COLOR [attr]

attr Specifies color attribute of console output

Color attributes are specified by TWO hex digits -- the first corresponds to the background; the second the foreground. Each digit can be any of the following values:

To change the color of the font:

Ex.

c:\>color 02

ð 1st digit used for background color and 2nd one for text color.

Attrib Command

Displays or changes file attributes.

Syntax:

ATTRIB [+R | -R] [+A | -A ] [+S | -S] [+H | -H] [drive:][path][filename] [/S [/D]]

Ex:

c:\>attrib

ð To display the hidden files.

c:\>attrib +h (directory or file name)

ð To make a file hidden.

c:\>attrib -h (directory or file name)

ð To remove the hidden status of a directory.

c:\>attrib +r (directory or file name)

ð To make a read only file

c:\>attrib +s (directory or file name)

ð To make a system file.

c:\>attrib +a (directory or file name)

ð To make a archive file.

c:\>attrib +a (directory or file name)

ð To remove the archive permission.

c:\>attrib +h +s +r +a (directory or file name)

ð To make all attribute permission.

c:\>attrib -h -s -r -a (directory or file name)

ð To remove all attribute permission.

Dir Command

Displays a list of files and subdirectories in a directory.

c:\>dir

ð To display the contains of the current directory.

c:\>dir/p

ð To display the contains of the current directory with a option, Press any key to continue . . . , It means that it Pauses after each screen full of information.

c:\>dir/w

ð To display the list of the current directory.

C:\>dir/w/p

ð The combination of /w and /p option.

CD - Change Directory

Displays the name of or changes the current directory.

Syntax:

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

CHDIR [..]

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

CD [..]

Ex.

C:\>cd windows

C:\WINDOWS>cd system32

C:\WINDOWS\SYSTEM32>cd ..

C:\WINDOWS>

ð To come out from the current folder to the parent folder.

C:\WINDOWS>cd system\color

C:\WINDOWS\SYSTEM\COLOR>

ð To go to any particular folder under another folder.

C:\WINDOWS\SYSTEM\COLOR>cd\

C:\

ð To come out to the c: drive.

Path Command

c:\>path

PATH=C:\WINDOWS\system 32; C:\WINDOWS; C:\WINDOWS\System32\Wbem;

ð To display the complete path of the command prompt.

Syntax of the adding a new path.

path=%path%;(new path)

Ex

C:\>path=%path%;d:\dir1

ð To add a new path.

C:\path

PATH=C:\WINDOWS\system 32; C:\WINDOWS; C:\WINDOWS\System32\Wbem; D:\DIR1

Fdisk Command

To create a new partition or delete a partition on the hard disk, we need to use fdisk command.

c:\>fdisk

ð To display the partition information.

Rename

Syntax:

ren (old file name) (new file name)

Ex.

C:\>ren MyInformation Myfile

ð To rename a file name.