HKNS

Basic Of Computer Tutorial (DOS/Windows)

Basic DOS Commands

 DIRECTORY COMMANDS:

MD (mkdir) Making Directory syntax MD <path\dir-name>

CD Change Directory syntax CD <path\dir-name>

RD (rmdir) Removing Directory syntax RD <path\dir-name>

REN Renaming File or Directory syntax REN <path\directory or file Old name> <NEW NAME>

DIR List the content of the storage device syntax DIR [/w /p/ad/S]

DIR /W WIDTHWISE DISPLAY

DIR /P PAGEWISE DISPLAY

DIR /S SUB-DIRECTORYWISE DISPLAY

DIR /AD TO DISPLAY DIRECTORIES ONLY

DIR /AH TO DISPLAY HIDDEN FILES

DIR /AS TO DISPLAY SYSTEM FILES

DIR /AR TO DISPLAY READ ONLY FILES

DIR /AA TO DISPLAY FILES READY FOR ARCHIVING

DIR /ON TO DISPLAY CONTENTS IN SORTED FORM (NAMEWISE)

DIR /OE TO DISPLAY CONTENTS IN SORTED FORM (EXT.WISE)

DIR /OA TO DISPLAY CONTENTS IN SORTED FORM (BY LAST ACCESS DATE EARLIER FIRST)

DIR /OS TO DISPLAY CONTENTS IN SORTED FORM (SIZEWISE-SMALEST FIRST)

DIR /OD TO DISPLAY CONTENTS IN SORTED FORM (BY DATE & TIME EARLIEST FIRST)

DIR /L USES LOWERCASE

HELP

COMMAND /? TO GET HELP

e.g. DIR /?

Dos has got two types of command Internal & External

FILE COMMANDS:

COPY CON [DRIVE:][PATH][FILE NAME] CREATING FILE

EDIT [DRIVE:][PATH][FILE NAME]

E.g. COPY CON C:\MYNAME.TXT

DEMO TEXT

^Z TO SAVE (CTRL + Z)

DEL *[DRIVE:][PATH][FILE NAME] DELETING FILE

eg. DEL C:\MYNAME.TXT

REN [DRIVE:][PATH][OLD NAME] [new NAME] RENAMING FILE

e.g. REN C:\MYNAME.TXT NAME.TXT

COPY <SOURCE FILE NAME> <DESTINATION FILE NAME>

e.g COPY C:\MYNAME.TXT NEWNAME.TXT

TYPE [DRIVE:][PATH][FILE NAME] VIEW THE CONTENT OF THE FILE

e.g. TYPE C:\MYNAME.TXT

 PRINTING FILE BY PRINTER

e.g. TYPE C:\MYNAME.TXT>PRN


WILD CARD - *?

*- IT CAN REPLACE N NUMBER OF CHARACTERS

? CAN REPLACE SINGLE CHARACTER

ATTRIB for Changing the attribute of a file / directory

+ Sets an attribute

- Clears an attribute

R read only attribute

A Archive attribute

S System Attribute

H Hidden attribute

/S Process files in all directories/sub-directories

e.g. Attrib +r myname.txt

Above command makes the file myname.txt read only

e.g. Attrib -r myname.txt

Above command removes the read only attribute from the file myname.txt

Date to find/set the system date in format (mm-dd-yyyy)

Time to find/set the system time in format (hh: mm: Ss a/p)

Fdisk partition

Format formatting disk

e.g. Format /s c:

Note: While giving the command Fdisk and Format be very carefull and use these two commands only if you know the proper use. Reason is with these two commands, total data on your computer will be lost


Windows:

Starting procedure: