Directory Commands

Current Directory

The directory that you are currently in. This is important because unless you specify otherwise the commands that you execute will operate within the current directory and drive.

MD

Make directory

a:\>MD CIS101

CD

Change Directory

a:\>CD CIS101

a:\ CIS101>

CD.. Move you one level up

a:\ CIS101>CD..

a:\>

CD \ Move you to the root

a:\ CIS101\PROJ1> CD \

a:\>

RD

Remove Directory

a:\ CIS101> RD PROJ1

 

Dir

The the directory command will display a list of files (and subdirectories) within the current subdirectory. This list has 5 columns

File Name

File Extension

File size

File creation date or last date file was modified

Time of last modification

Dir

Top 2 lines

Gives information about the disk in which the directory is on.

 

3 line

Name of the directory

 

4 line

The period is shorthand for the current directory

 

5 line

The two periods is shorthand for the parent directory

 

Following is a list of files and subdirectories

 
 

Total file number line

Total number of files and subdirectories

 

Total bytes

Total number of bytes for the files and subdirectories

 

Total number of free bytes left.

 

Switches

/W

Wide screen, displays only filenames and extensions

/P

Displays the output one screen at a time.

/B

Displays only filenames and extensions.

/C

Displays file compression ratio

/A

Displays file specified attributes

/L

Use lowercase

/S

Displays all the files in the directory you specify and in all subdirectories of the directory

/O

Sets the sort order

/on

sorts the files alphabetically the file name

/oe

sorts the files alphabetically by extension

/os

sorts the files by size, smallest to largest.

/og

sorts by group directories first

/oc

sorts by compression ratio

/od

sorts by date