In this Article I discuss about Ms DOS
Only Steps
MS DOS NOTES
GOTO DOS FROM WINDOWS XP----------------------------------------------
START - RUN
- INPUT THE FILE NAME- COMMAND
OR
START - PROGRAMS - ACCESSORIES-COMMAND PROMPT
TO MAXIMISE THE SCREEN PRESS- Alt+ enter
TO CREATE A FILE IN DOS
--------------------------------------
COPY CON
SYNTAX : C:\>COPY CON [SPACE] FILE NAME
SAVE THE FILE
---------------------
CTRL +Z
- A MESSAGE WILL BE APPEARED 1 FILE COPIED
THAT MEANS THE FILE HAS BEEN CREATED.
***
IN DOS FILE NAME GENERALLY DIVIDED INTO
2 PARTS
- A) PRIMARY FILE NAME , THAT HOLDS MAXIMUM
8 CHARACTER
- B) SECONDARY FILE NAME , THAT ALSO CALLED
EXTENSION PART , THAT HOLDS MAXIMUM
3 CHARACTER
*** IN MIDDLE OF THE PRIMARY FILE NAME
AND SECONDARY FILE NAME YOU MUST
GIVEN A . (DOT)
*** EXTENSION PART GENERALLY
ACKNOWLEDGE THE TYPE OF FILE.
OR
SYNTAX : C:\>EDIT [SPACE] FILE NAME
SAVE THE FILE
----------------------
ALTER +F - SAVE
EXIT FROM FILE
------------------------
ALTER +F - EXIT
TO DISPLAY FILES AND DIRECTORIES
-------------------------------------------------------
DIR
SYNTEX : C:\>DIR
MORE COMMAND RELATING TO DIR
SEE 2ND CLASS.
TO RENAME A FILE
----------------------------
REN
SYNTEX : C:\>REN [SPACE] OLD FILE NAME[SPACE] NEW FILE NAME
TO DELETE A FILE
----------------------------
DEL
SYNTEX : C:\>DEL [SPACE] FILE NAME
DIRECTORY
==========
CONCEPT OF DIRECTORY IS SAME AS FOLDER IN
WINDOWS
TO CREATE A DIRECTORY
-------------------------------------
MD - MAKE DIRECTORY
SYNTEX : C:\>MD [SPACE] DIRECTORY NAME
TO ENTER INTO DIRECTORY
----------------------------------------
CD - CHANGE DIRECTORY
SYNTEX : C:\>CD [SPACE] DIRECTORY NAME
TO DELETE A DIRECTORY
--------------------------------------
RD -ROOT DIRECTORY
SYNTEX : C:\>RD [SPACE] DIRECTORY NAME
** DIRECTORY MUST BE EMPTY
TO EXIT FROM DIRECTORY
---------------------------------------
CD..
- EXIT FROM SUBSEQUENT PREVIOUS
DIRECTORY
CD\
- EXIT TO ROOT DIRECTORY
TO CLEAR THE SCREEN
-----------------------------------
CLS
SYNTEX : C:\>CLS
MORE COMMANDS
---------------------------
DATE SEE PAGE NO. 13
TIME "
VOL "
VER "
TYPE "
COPY A FILE FROM ONE LOCATION TO ANOTHER
LOCATION
--------------------------------------------------------------------
COPY
SYNTEX : C:\>COPY [SP] SOURCE LOCATION [SP]
TARGET LOCATION (DESTINATION)
SOURCES LOCATION : DRIVE\DIRECTORY\FILE
NAME
DESTINATION : DRIVE\DIRECTORY
EX : COPY THE FILE BEHALA.TXT TO PATNA
DIRECTORY
C:\>COPY [SP] C:\WB\KOLKATA\BEHALA.TXT [SP]
C:\BIHAR\PATNA
- A MESSAGE WILL BE APPEARED 1 FILE
COPIED
MOVE A FILE FROM ONE LOCATION TO ANOTHER
LOCATION
--------------------------------------------------------------------------
MOVE
SYNTEX : C:\>MOVE [SP] SOURCE LOCATION [SP]
TARGET LOCATION (DESTINATION)
SOURCES LOCATION : DRIVE\DIRECTORY\FILE
NAME
DESTINATION : DRIVE\DIRECTORY
EX : MOVE THE FILE BEHALA.TXT TO PATNA
DIRECTORY
C:\>MOVE [SP] C:\WB\KOLKATA\BEHALA.TXT [SP]
C:\BIHAR\PATNA
- A MESSAGE WILL APPEARED 1 FILE
MOVED
Display List
18. To display all directory
Dir
19. To display entire drive
Dir f:
20. To display page wise
Dir/p
21. To display width wise
Dir/w
22. To display list by sorted order on primary name
Dir/on
23. To display list by size wise
Dir/os
24. To display sorted order on extension name
Dir/oc
25. To display hidden file
Dir/ah
26.To display read only file
Dir/ar
To Change Prompt:
28. To change the command prompt as text
C:\>Prompt (sp) <text>
Exam: C:\>prompt (sp) youth
29. To change prompt greater than sign
C:\>Prompt (sp) $g
30. To change prompt current drive and directory
C:\>Prompt (sp) $p
31. To display prompt system date
C:\> Prompt (sp) $d
32. To display current system date as prompt
C:\>Prompt (sp) $t
33. To display less than sign as prompt
C:\>Prompt (sp) $l
34. To display equal sign as prompt
C:\>Prompt (sp) $q
35. to display bar sign as prompt
C:\> Prompt (sp) $b
36. To return default command prompt
C:\>Prompt (sp) $p$g
Attrib :
We can give different attributes to a file such as hidden, read-only system etc. by attrib command.
To create hidden file
C:\>Attrib +h filename
To remove the hidden attribute:
C:\>attrib –h file name
To make a file read only:
C:\>attrib +r file name
To remove the read only attribute:
C:\>attrib –r file name
To make a file as system file:
C:\>attrib +s file name
To remove the system file attribute:
Label:
It is an external command. This command is used to create or change the volume label of disk. It also displays volume serial no. of disk.
Syntax: c:\>label
Example: to change the current label as “Youth”:
C:\>label
It will display: volume in drive c is computer
Volume Sl. No. is 9816-BBF1
Volume label (11 characters, ENTER for nun)? _
Type label “youth” at current cursor position.
CHKDSK:
It is an external command. This command is used to check the disk and display the status report.
Syntax: c:\>CHKDSK
Find:
Find command is used to find out a text or strings from a file.
Syntax: c:\>find “text” file name
Example:
Create a file named youth and write the following text “youth computer training centre”
Now suppose you want to find the text ‘computer’ which is written into this file.
Syntax: c:\>find (sp) “computer” (sp) youth
Tree:
Tree command is used to display the directory structure or hierarchical relationship of directories and sub-directories.
Syntax: c:\>tree (sp) directory name
Xcopy:
Xcopy is an external command. It is used to copy all the files along with their directories and sub-directories to one location to another location.
Syntax: c:\>xcopy/s A: (sp) C:
(/s indicates all the files in a: drive and all the sub-directories)
Diskcopy:
Diskcopy is used to copy the entire content of a diskette to another drive. This command works only with floppy disk.
Syntax: c:\>diskcopy (sp) a: (sp) b:
More:
More command is used to pause the vertical scrolling on the display screen. After each screen full of information displayed a message - -------more-------.
Syntax: c:\>more (sp) file name
Wild card characters:-
1. * (asterisk sign)
2. ? (Question mark)
* sign use for a group of word
? Mark use for a single character.
Example:
1. Find a file which name started with "s" and extension name is unknown.
2. Find a file which 1st character is "T" and Last character is "a”. The file name must be 4 characters long.
3. Find a 5 character long file which middle two characters is "bn" and extension name is .xls
4. Find all file and folder of this computer.
5. Create a file in "F" drive. Then find that file by
Search from start menu.
To see all the .txt files:
Syntax: Dir (sp) *.txt (enter)
To see the txt file which first character is “m” and last character is “n”. the file is three characters long.
Syntax:c:\> Dir (sp) m?n.txt (enter)
To see all the files:
Syntax: c:\>dir (sp) *.* (enter)
Find the file named ‘youth’ which extension name may be any
Syntax: c:\>dir (sp) youth.* (enter)
Find a file (five characters long) which last three characters are “ash” and extension name (three characters long) started with g and ended with p.
Syntax: c:\>dir (sp) ??ash.g?p (enter)
BATCH FILE
------------------
BATCH FILE IS SPECIAL TYPE OF FILE , WHERE
WE CAN WRITE THE DOS COMMANDS.
THE COMMANDS ARE AUTOMATICALLY EXECUTED AT THE
TIME OF RUN THE FILE.
AT THE TIME OF CREATION OF BATCH FILE EXTENSION NAME
ALWAYS WILL BE . BAT
EXP.
-----
CREAT A BATCH FILE NAMED SSR.BAT
AND WRITE THE DOS COMMAND
DATE
TIME
VOL
VER
HOW TO RUN THE BATCH FILE
---------------------------------------------
FROM COMMAND PROMPT , JUST WRITE THE
FILE NAME AND PRESS ENTER.
C:\>SSR [ENTER]
0 Comments
Don't Spam/Scam ....Otherwise Thanks For Comment...