Microsoft DOS Commands
-
Upload
ako-csir-artberacute -
Category
Documents
-
view
248 -
download
1
Transcript of Microsoft DOS Commands
-
8/9/2019 Microsoft DOS Commands
1/28
-
8/9/2019 Microsoft DOS Commands
2/28
About cls
• Cls is a command that allows a user to
clear the complete contents of thescreen and leave only a prompt.
Availability
The cls command is an internal command and is available in the below Microsoftoperating systems.
http://www.computerhope.com/jargon/i/intecomm.htmhttp://www.computerhope.com/jargon/i/intecomm.htm
-
8/9/2019 Microsoft DOS Commands
3/28
Syntax
•CLS
-
8/9/2019 Microsoft DOS Commands
4/28
Microsoft
DOS rd and
rmdir
command
-
8/9/2019 Microsoft DOS Commands
5/28
About rd and rmdir
• Removes an empty directory in MS-
!S. To delete directories with "lesor directories within them the usermust use the deltree command# or if
you are running Microsoft $indows%&&& or $indows '( use the )Soption.
Availability• The rd and rmdir commands are
internal commands and are available
in the below Microsoft operating
http://www.computerhope.com/deltree.htmhttp://www.computerhope.com/jargon/i/intecomm.htmhttp://www.computerhope.com/jargon/i/intecomm.htmhttp://www.computerhope.com/deltree.htm
-
8/9/2019 Microsoft DOS Commands
6/28
Syntax
• RM*R +)S, +),+drive,path
R +)S, +), +drive,path/S
Removes all directories and files in the specified
directory in addition to the directory itself. Used to
remove a directory tree.
/Q Quiet mode, do not ask if ok to remove a directory tree
with /S.
-
8/9/2019 Microsoft DOS Commands
7/28
Examples
• *f a directory contains "les or folderswhen attempting to delete thedirectory you will receive /The
directory is not empty./ errormessage. *f you want to deletedirectories that are full# use thedeltree command or if you0re using$indows %&&& or later use the
rmdir c2full
http://www.computerhope.com/deltree.htmhttp://www.computerhope.com/deltree.htm
-
8/9/2019 Microsoft DOS Commands
8/28
rmdir c:\test /s
• $indows %&& $indows '(and later versions of $indows
can use this option with aprompt to permanently deletethe test directory and allsubdirectories and "les.3dding the )4 switch would
suppress the prompt.
-
8/9/2019 Microsoft DOS Commands
9/28
Microsoft DOS movecommand
-
8/9/2019 Microsoft DOS Commands
10/28
About move
•
3llows you to move "les ordirectories from one folder toanother# or from one drive to
another.Availability
•
The move command is aninternal command that isavailable in the below Microsoft
operating systems.
http://www.computerhope.com/jargon/i/intecomm.htmhttp://www.computerhope.com/jargon/i/intecomm.htm
-
8/9/2019 Microsoft DOS Commands
11/28
Syntax
• Moves "les and renames "lesand directories.
• To move one or more "lesM!56 +)7 8 )-7, +drive,+path,"lename9+#..., destination
• To rename a directoryM!56 +)7 8 )-7, +drive,+path,dirname9 dirname%
-
8/9/2019 Microsoft DOS Commands
12/28
[drive:]
[path]filename1
Specifies the location and name of the file or files
you want to move.
destination Specifies the new location of the file. Destinationcan consist of a drive letter and colon, a
directory name, or a combination. If you are
moving only one file, you can also include a
filename if you want to rename the file when you
move it.
[drive:]
[path]dirname1
Specifies the directory you want to rename.
dirname2 Specifies the new name of the directory.
/Y Suppresses prompting to confirm you want to
overwrite an existing destination file.
/-Y Causes prompting to confirm you want tooverwrite an existin destination file.
-
8/9/2019 Microsoft DOS Commands
13/28
Examples
move c:\windows\temp\*.*c:\temp
Move the files of c:\windows\temp to thetemp directory in root, this is of courseassuming you have the windows\temp
directory. In this example, *.* is wildcards telling the computer every file with everyextension.
http://www.computerhope.com/jargon/w/wildcard.htmhttp://www.computerhope.com/jargon/w/wildcard.htm
-
8/9/2019 Microsoft DOS Commands
14/28
move "computer hope"
exampleIf your directory name has a space, it
must be surrounded withquotes,otherwise you will get a "The syntax of the command is incorrect
." error message. In the above example,this command would move the"computer hope" directory into the
exam le director contained in the
http://www.computerhope.com/jargon/q/quote.htmhttp://www.computerhope.com/issues/ch001336.htmhttp://www.computerhope.com/issues/ch001336.htmhttp://www.computerhope.com/jargon/q/quote.htm
-
8/9/2019 Microsoft DOS Commands
15/28
move stats.doc,
morestats.docc:\statistics
The above example wouldmove the files stats.doc
and morestats.doc intothe c:\statistics folder.
-
8/9/2019 Microsoft DOS Commands
16/28
MicrosoftDOS copy
command
-
8/9/2019 Microsoft DOS Commands
17/28
About copy
•
3llows the user to copy one ormore "les to an alternatelocation.
Availability• The copy command is an
internal command and isavailable in the belowMicrosoft operating systems
http://www.computerhope.com/jargon/i/intecomm.htmhttp://www.computerhope.com/jargon/i/intecomm.htm
-
8/9/2019 Microsoft DOS Commands
18/28
Syntax
• Windows ista andlater syntax
C!(7 +), +)5, +):, +)7 8)-7, +);, +)L, +)3 8 )< ,
source +)3 8 )
-
8/9/2019 Microsoft DOS Commands
19/28
source Specifies the file or files to be copied.
/A Indicates an ASCII text file.
/B Indicates a binary file.
/D Allow the destination file to be created decrypted.
destination Specifies the directory or filename for the new file(s).
/V Verifies that new files are written correctly.
/N Usesshort filename, if available, when copying a file
with a non-8dot3 name.
http://www.computerhope.com/jargon/num/8-3-format.htmhttp://www.computerhope.com/jargon/num/8-3-format.htm
-
8/9/2019 Microsoft DOS Commands
20/28
/Y Suppresses prompting to confirm you want to
overwrite an existing destination file.
/-Y Causes prompting to confirm you want to
overwrite an existing destination file.
/Z Copies networked files in restartable mode.
/L If the source is a symbolic link, copy the link
to the target instead of the actual file the
source link points to.
-
8/9/2019 Microsoft DOS Commands
21/28
Windows XP and
earlier syntaxCOPY [/A | /B] source
[/A | /B] [+ source [/A| /B] [+ ...]]
[destination] [/A | /B]][/V] [/Y | /-Y]
-
8/9/2019 Microsoft DOS Commands
22/28
source Specifies the file or files to
be copied.
/A Indicates an ASCII text
file.
/B Indicates a binary file.
destination Specifies the directory orfilename for the new file(s).
-
8/9/2019 Microsoft DOS Commands
23/28
/V Verifies that new files are written
correctly.
/Y Suppresses prompting to confirm
you want to overwrite an existing
destination file.
/-Y Causes prompting to confirm you want to overwrite an existing
destination file.
-
8/9/2019 Microsoft DOS Commands
24/28
xamples
copy *.txt c:\In the above copy command weare using a wildcard to copy
all .txt files (multiple files) fromthe current directory to the c:\root directory.
http://www.computerhope.com/jargon/w/wildcard.htmhttp://www.computerhope.com/jargon/r/root.htmhttp://www.computerhope.com/jargon/r/root.htmhttp://www.computerhope.com/jargon/w/wildcard.htm
-
8/9/2019 Microsoft DOS Commands
25/28
copy *.* a:Copy all files in the
current directory tothe floppy disk drive.
-
8/9/2019 Microsoft DOS Commands
26/28
copy "computer
hope.txt" hopeCopy the file "computer hope.txt"into the hope directory. Whenever
dealing with a file or directory witha space, it must be surroundedwithquotes. Otherwise you'll get
the "The syntax of the command is incor
rect."
http://www.computerhope.com/jargon/q/quote.htmhttp://www.computerhope.com/issues/ch001336.htmhttp://www.computerhope.com/issues/ch001336.htmhttp://www.computerhope.com/issues/ch001336.htmhttp://www.computerhope.com/issues/ch001336.htmhttp://www.computerhope.com/jargon/q/quote.htm
-
8/9/2019 Microsoft DOS Commands
27/28
copy
myfile1.txt+myfile2.txtCopy the contents in
myfile2.txt andcombines it with the
contents in
myfile1txt
http://www.computerhope.com/jargon/c/combine.htmhttp://www.computerhope.com/jargon/c/combine.htm
-
8/9/2019 Microsoft DOS Commands
28/28
copy con test.txt
>inally# a user can create a "le usingthe copy con command as shown
above# which creates the test.t1t "le.!nce the above command has beentyped in# a user could type in
whatever he or she wishes. $hen youhave completed creating the "le# youcan save and e1it the "le by
pressing !"#$%& which would create