Commands of Ms Dos - BBA NOTES PDF

Title Commands of Ms Dos - BBA NOTES
Course Bachelors of Business Administration
Institution Guru Gobind Singh Indraprastha University
Pages 19
File Size 1.3 MB
File Type PDF
Total Downloads 52
Total Views 159

Summary

BBA NOTES...


Description

Commands of Ms Dos Q1-> 1) Date: It displays or sets the date. Command Syntax:

Steps: a) Type the date like this 1-15-97 b) Press the enter key if don’t want to set the new date. c) Notice that the c:>prompt will appear. Explanation of Syntax: Sets the date you specify.Type Date without parameters to display the current date setting and a prompt for a new one. 2) Time:It displays or sets the time. Command Syntax:

Steps: a) Type the time like this: 8:46 b) Press the enter key. c) Notice that the c:> prompt will appear. Explanation of Syntax: Type time without any parameter is used to display the current time setting and a prompt for a new one.

3) Ver: Displays the Windows XP version. Command Syntax

4) Cls: it Clears the screen. Command Syntax:

l

5) Dir:

Displays a list of files and subdirectories in a directory.

DIR [drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L] [/N] /A

Displays files with specified attributes.

attributes D Directories R Read-only files H Hidden files A Files ready for archiving S System files /L Uses lowercase. /N New long list format where filenames are on the far right. /O List by files in sorted order.

6) mkdir: This command is used to create the directory. The Directory command is like a table of contents in a book. This will list the following information:

a) b) c) d)

File names File Extensions Size of each file Date and time the file was last updated.

Command Syntax

7) Copy con: it creates a file in this directory bba Steps:a) Create the directory bba b) Type cd bba c) Type copy con filename d) Press control+z to save the file e) Or press control+c to cancel

8) Copy command :- it creates a duplicate of the file Command Syntax: Steps to create the duplicate of the file named priyanka to nandwani a) Copy priyanka nandwani

9) Del: del command is used to delete the existing files. Command Syntax:

Various possible options with del a) Del /p :- Prompts for confirmation before deleting each file. b) Del /f :- force deleting of read only files. 10) Rename:- This is used to change the name of the file. Steps : a) In the directory list all the files by using dir b) Type rename existing_filename new_filename c) Type dir to list the files Command Syntax:

11) Edit:- this command is used to edit the existing file Command Syntax:

12) Rmdir :This command is used to remove the directory Steps: a) Before deleting the directory, directory should be empty. b) Type cd dirname, dirname is the name of the directory which you want to delete. c) List all the files in the directory by using dir command d) Delete all the files in the directory by using del *.* e) It will prompt a message Are you sure(y/n). f) Press y for yes, n for no.

g) Type cd .. , it will move you out of the directory h) Type rmdir to remove the directory i) Directory is deleted.

Q2-> External commands: 1) Label: It creates, changes, or deletes the volume label of a disk. Command syntax: Label [drive:][label] Label /mp :specifies that the label should be treated as a mount point or volume name.

Steps a) b) c) d)

Go to that drive which you want to change the label. Type label If want to enter a new label type the new label name. If don’t want to change the label name then press enter.

2) Chkdsk:-it checks a disk and displays a status report. switches with chkdsk a) Chkdsk [volume][path][filename] [/p] [/v] [/r] [/x] [/l[:size] b) Switches with chkdsk: c) Volume: specifies the drive letter. d) Filename: FAT/FAT32 only: specifies the files to check for fragmentation. e) /f: fixes error on the disk f) /v:displays the full path and name of every file on the disk. g) /r: locates bad sectors and recovers readable information

h) /l:size: changes the log file size to the specified number of kilobytes. i) /x: forces the volume to dismount first if necessary.

Command Syntax:

3) XCOPY: Copies files and directory trees. XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W] [/C] [/I] [/Q] [/F] [/L] [/G] [/H] [/R] [/T] [/U] [/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z] [/EXCLUDE:file1[+file2][+file3]...] Various Switches:a) b) c) d) e) f) g)

/P /S /E /V /W /C /I

Prompts you before creating each destination file. Copies directories and subdirectories except empty ones. Copies directories and subdirectories, including empty ones. Verifies each new file. Prompts you to press a key before copying. Continues copying even if errors occur. If destination does not exist and copying more than one file.

Command Syntax:

4) Diskcopy: Copies the contents of one floppy disk to another. DISKCOPY [drive1: [drive2:]] [/V] /V Verifies that the information is copied correctly. Command Syntax

5) More:- Displays output one screen at a time. MORE [/E [/C] [/P] [/S] [/Tn] [+n]] < [drive:][path]filename a) b) c) d) e) f)

/E Enable extended features /C Clear screen before displaying page /P Expand FormFeed characters /S Squeeze multiple blank lines into a single line /Tn Expand tabs to n spaces (default 8) +n Start displaying the first file at line n Command Syntax

6) Doskey: Edits command lines, recalls Windows XP commands, and creates macros. Command Syntax

7) Diskcomp: Compares the contents of two floppy disks. DISKCOMP [drive1: [drive2:]] 8) Attrib: Displays or changes file attributes. ATTRIB [+R | -R] [+A | -A ] [+S | -S] [+H | -H] Switches with Attrib:a) + Sets an attribute. b) - Clears an attribute. c) R Read-only file attribute.

[/S [/D]]

d) A e) S f) H g) /D

Archive file attribute. System file attribute. Hidden file attribute. Processes folders as well.

Command syntax:

9) Wildcard characters(? and *): ? is used for the appearance of one character. * is used for zero or more appearances. a)Write a command to list all the files up to 3 characters long. Steps: (i) Create some files by using copy con command. (ii) List the files by using dir command. (iii) Type the command dir???.* to list all the files up to three characters long.

b)Write a command to list all the files which start with ‘i’ and end with ‘t’ ? Steps: (i) Create some files using copy con command. (ii) List the files by using dir command. (iii) Type the command dir i*t.* to list all the files starting with ‘i’ and end with ‘t’. Command syntax:

Difference between Internal and External Commands

I NTERNALCOMMANDS 1.

These are those commands which are contained in command.com files of MS-DOS.

2.

These are those functions that are built into the command interpreter.

3.

There is no need of any external file in computer to read internal MS-DOS command.

4.

These commands can be used as long as DOS is running on the system.

5.

Internal commands do not vary from system to system.

6.

These are ver, time, del, md, cd, copy con, cls, date, vol, ren, copy etc.

EXTERNALCOMMANDS 1.

These are those commands which are not in-built in MS-DOS.

2.

External commands are those which are not included in the interpreter.

3.

There is a need of an internal file in the computer to read external MS-DOS command.

4.

External command may vary from system to system. This means any two computers with same version of MS-DOS may have same internal commands, but may have different external commands.

5.

These are tree, xcopy, diskcopy, more, print etc.

When a Computer is switched on POST (Power on Self Test) operation is performed, which checks integrity of all components (CPU, Memory, I/O devices) of the system. If a component is found faulty , error message will be displayed. A chip called ROM - BIOS is read and executed. BIOS (Basic Input Output Services) information is a pre-written program that is permanently stored on ROM chip. DOS commands are generally classifieds in two types. Internal Command DOS commands for which the specifications are available in Shell (Command.com) are calledinternal commands. These are frequently used commands, and are called resident commands. DOS Commands for which specifications are not internally available in command.com are called External Commands. They reside in the disk in the form of executable program files. They will be loaded into primary memory only at the time of execution. Directory Structure of DOS: One thing is to be kept in mind is that a directory can have as many child (sub) directories, but the child directory can have only one parent directory. 1. CLS: this command is used to clean the screen. 2. DIR: this command allows the user to see all files and sub-directory in the current directory. DIR Command lists file information in five columns; (first) column gives primary name of the file (second) column gives extension of the file (third) column gives the file size - number of bytes used; (fourth) column gives the last updated date; (fifth) column gives the last updated time. Dir/p - page by page display of file name and directory names; Dir/w - width-wise display; Dir/s - displays all sub directory and files in the sub-directory of current directory. 3. Copy con this command copies whatever typed on keyboard to the file; the file can be closed by giving the command A2 or F6 key: eg: Copy con test .....A2. 4. Date it displays two system date and allows the user to change it if desired ; it is displayed in the form of mm - dd - yy; eg:c:\> date - enter. 5. Time it displays the system type and enables the user to change it; eg: C:\> Time - enter. 6. md(mkdir) it creates a new directory in sub directory in the current directory; eg: C:\> md 7. rd(rmdir) this command is used to remove a directory from the disk; it can't remove a directory which contains sub directory or files, ie, the child should be removed from the parent; similarly this command can't remove the current directory and root directory. Syntax: c:\> RD. 8. Type it displays the content of saved file; eg: C:\> Type> file name. 9. Ren this command changes the name of existing file or directory: Syntax: C:\> ren new name> 10. Delete delete a file from current directory; Syntax: C;\> del 11. Ver it displays the version of DOS currently being used in the system; Syntax: C:> ver 12. Copy it copies the given file or files from the source directory to the largest directory; Syntax:C:\> copy .

13. Prompt allows the user to set a new DOS prompt instead of usual C:\> or A:\>; eg C:\> prompt pcc; Prompt$p$g - this allows you to reset default prompt; Prompt $d (current date); Prompt $t (current time); External Command 1. Attrib this command is used for protecting the files from accidental changes or modification. It can also be used for making a hidden file, archive files, read only files; Syntax: Attrib +R/-R/+H/-H/+A/-A +FR protects the file by making it read only, -R removes the read only protection; eg: Attrib + r

2. Scandisk/ Chkdisk this command checks the status of the disk; it shows a graphical display, information about the user file. 3. Tree this command graphically displays the path of each directory and sub directory in given drive; Syntax: C:\> tree< 4. More it displays one screen of data at a time and is used with another command when one screen is full; if you press any key on the next screen is displayed: Syntax C:\> type abc.doc| more. 5. Edit the command loads the MSDOS editor, where we can edit files, create new files, open existing files; Syntax: C:\> edit < file name> 6. Label a label is a name given to a disk which refers to collection of filers and directories on disk; Syntax: C:\>label A. 7. Sort this command is used for sorting data and displaying the result on the screen: Syntax:C:\>dir/sort/r (reverse order) 8. Format; this command prepares a disk by arranging random magnetic impulses in to a series of track and sectors so that it is addressable by a DOS version; Syntax : C:\> format A:/s 9. Sys this command transfers MSDOS System files to specified areas to make the disk boo table; Syntax: C:\>Sys A:< 10 Pipes (|) it connects two files ie the standard output of one filter command becomes standard input of another filter; eg Dir/Sort/ more || 11. Batchfiles all batch files on DOS must have the file extn on bat to execute the batch file, the user has just type the file name and press enter key, in addition to usual DOS command. 12. Echo this command can be used to display a message on the screen 13. Pause when this command is obeyed, the system waits for the user to press a key by displaying a line "strike a key when ready" 14. Rem a command or remark can be used on batch file by the rem command; to symbol @ can be put in a REM command to prevent DOS from displaying the commend during the execution of batch files....


Similar Free PDFs