DOS commands INTERNAL DOS COMMANDS Internal Commands are

  • Slides: 18
Download presentation
DOS commands

DOS commands

INTERNAL DOS COMMANDS Internal Commands are located in memory and do not require and

INTERNAL DOS COMMANDS Internal Commands are located in memory and do not require and further disk access when they are used. The DOS internal commands are so-called because their instructions are a part of COMMAND. COM, the DOS command line interpreter. COPY, DEL, DIR, VER, TYPE, TIME, CD, DATE, CLS

What is DOS? DOS (Disk Operating System) is first operating system release by Microsoft.

What is DOS? DOS (Disk Operating System) is first operating system release by Microsoft. Before Microsoft; DOS was released by IBM named IBM DOS. Bill Gates started own company Microsoft and released MS DOS 1. 0. Before invention GUI Operating System (Windows) DOS’s last version was 6. 22. After DOS 6. 22 Microsoft never release MS DOS was a simple and command based operating system. There was no use of mouse in MS DOS. All commands were type able from keyboard.

Internal commands in Details �COPY: COPY Copies a file. Name of copy may be

Internal commands in Details �COPY: COPY Copies a file. Name of copy may be the same as original, or different. This command obviously copies files to different spots on your disks. It does not remove the source file after writing the new file Syntax: COPY [d: ][path][name. ext] �VER: VER will tell you what version of DOS you are using. If you happen to be stuck with widoz`95 VER will tell you some Windows version junk. Syntax: - VER

 DIR: DIR Shows directory information of a diskette: name, size, and the date

DIR: DIR Shows directory information of a diskette: name, size, and the date and time stamp of files. Syntax: DIR [d: ][path] Optional switches /p- Display dir info and pauses display when the screen is full /w -Display names and extensions only in five columns DEL: Deletes a file from disk. Syntax: - DEL [DRIVE: ][PATH]FILENAME[/P]

 TYPE: This command will dump the contents of a text file to your

TYPE: This command will dump the contents of a text file to your screen. This should mostly be used on plain ASCII text files. Syntax: TYPE [d: ][path][name. ext] CD: This command lets you change directories. Lets say you are at root (Just a "C : >" prompt) and you want to get into a directory named WINDOWS. >co windows. Syntax: CD [path][dirname]

�TIME: TIME Displays current time and allows it to be changed. Syntax: TIME �DATE:

�TIME: TIME Displays current time and allows it to be changed. Syntax: TIME �DATE: Displays current date and allows it to be changed. Syntax: DATE �CLS: Clears the screen. Syntax: CLS

�COPY CON : COPY CON is used to copying information from keyboard in particular

�COPY CON : COPY CON is used to copying information from keyboard in particular file. This command is used to create a file directly from DOS. Syntax: - COPY CON FIENAME. EXTENSION �REN: REN command is used to rename the existing file only. This command is used in such situation when any wrong file name has been entered or user wants to change the filename for some security purposes. Syntax: - C: >REN OLDFILENAME NEWFILENAME. EXTENSION

MKDIR(MD), CHDIR(CD) , RMDIR(RD) MD MAKES A DIRECTORY CD CHANGES DIRECTORY RD REMOVES A

MKDIR(MD), CHDIR(CD) , RMDIR(RD) MD MAKES A DIRECTORY CD CHANGES DIRECTORY RD REMOVES A DIRECTORY

�MD and MKDIR: This lets you Make a Directory, hence the MD. You type

�MD and MKDIR: This lets you Make a Directory, hence the MD. You type MD followed by a file name. You can nest (Make a directory within a directory) up to 16 directories on most DOS only systems Syntax: - MD [DRIVE: ]PATH MKDIR [DRIVE: ]PATH �RD and RMDIR: RD will remove a Directory. Use RD followed by the name of the directory you wish to delete. You must empty the directory first or you will just get an error message from DOS. Syntax: - RD [DRIVE: ] PATH RMDIR [DRIVE: ] PATH

EXTERNAL DOS COMMANDS They reside on the DOS disk and require a disk access

EXTERNAL DOS COMMANDS They reside on the DOS disk and require a disk access to be used. An external command, which is not embedded into command. com and therefore requires a separate file to be used. External commands are commonly external either because they require large requirements or are not commonly used commands. CHKDSK, FORMAT, DISKCOPY , APPEND, ASSIGN

FORMAT: NEW DISKS MAY BE FORMATTED ALREADYOR NOT USING THE FORMAT COMMAND INITIALIZES; BY

FORMAT: NEW DISKS MAY BE FORMATTED ALREADYOR NOT USING THE FORMAT COMMAND INITIALIZES; BY WRITING CODE ON IT TO ASSIGN TRACKS AND SECTORS WHERE YOUR DATA WILL BE STORED. FORMAT ERASES AND CHECKS OLD DISKS FOR ERRORS FORMAT A: /S/Q/U

�CHKDSK: CHKDSK command checks the status of a disk and displays a status report.

�CHKDSK: CHKDSK command checks the status of a disk and displays a status report. This is an external command which requires CHKDSK. EXE file to be executed. CHKDSK also displays a summary of disk usage. Syntax: - CHKDSK [DRIVE: ][[PSTH]FILENAME] [/F] [/V] �BACKUP : This command backs up one or more files from one disk onto another. Syntax: - BACKUP SOURCE DESTINATION-DRIVE

� ATTRIB: Change or view the attributes of one or more files. It defaults

� ATTRIB: Change or view the attributes of one or more files. It defaults to displaying the attributes of all files in the current directory. Syntax: - ATTRIB [+R|-R] [+A|-A] [+S|-S] [+H|H][drive: ][path][filename] [/S [/D]] � RESTORE: RESTORE command restores files that were backed up by using any version of BACK-UP from MSDOS Syntax: - RESTORE DRIVE 1: DRIVE 2: [PATH[FILENAME]] [/S] [/P] [/B: DATE] [/A: DATE] [/E: TIME] [/L: TIME] [/M] [/N] [/D]

�DELTREE: Deletes a directory along with all of the files and subdirectories that it

�DELTREE: Deletes a directory along with all of the files and subdirectories that it contains. Normally, it will ask for confirmation of such a drastic action. Syntax: - DELTREE [/Y] [DRIVE: ]PATH [[DRIVE: ]PATH[…]] �PRINT: PRINT command prints a text file while you are using other MS-DOS commands. This cannot be executed without PRINT. EXE Syntax: - PRINT [[DRIVE: ][PATH]FILENAME[…]] [/C] [/P]

� MOVE: MOVE command is used to move file/s from one directory to another

� MOVE: MOVE command is used to move file/s from one directory to another directory. The MOVE command can also be used to rename directory and filename. Syntax: - MOVE [DRIVE: ] [PATH] FILENAME [, [DRIVE: ][PATH]FILENAME[…]] DESTINATION � XCOPY: XCOPY command copies directories, their subdirectories, and files (except hidden and system files). Syntax: - XCOPY SOURCE [DESTINATION] [/A|/M] [/D: DATE] [/P] [/S [/E]] [/V] [/W]

Diff b/w Internal and External Commands Internal commands are the commands that are executed

Diff b/w Internal and External Commands Internal commands are the commands that are executed directly by the shell. These commands will not have a separate process running for each. Internal commands are stored in the cmd. exe command interpreter, ex. Dir. External commands are the commands that are executed by the kernel. These commands will have a process id running for it. External commands correspond to a . com or . cmd file, ex. Robocopy.

Thank You. . Chhavi Mahajan

Thank You. . Chhavi Mahajan