Pract 2.windows Command
Pract 2.windows Command
WINDOWS COMMAND – 1
Aim: Execute following Windows (DOS) Commands – date, time, md, cd, rd, path, set path, chkdsk,
copy,
Commands:
1. date
Syntax: >date
Working: ‘date’ command is used to display and change date. If you don’t want to change date just
press
enter to come out. If you want to change date, insert new date in dd-mm-yy format and press enter.
2. time
Syntax: >time
Working: : ‘time’ command is used to display and change time. If you don’t want to change time just
press
enter to come out. If you want to change time, insert new time in Hours:Mins:Sec.Nano Sec format
and
press enter.
3. md
Syntax: md Dir_Name
4. cd
5. rd
Syntax:> rd dir_name
Working: ‘rd’ command is used to remove/delete a directory. Note this command should not be
used to
delete file. In e.g. below after we remove directory B1, We cannot make it current working directory
as B1
6. chkdsk
Working: chkdsk—Check Disk. This command is used to verify the file systems integrity and list any
errors
Short output:
PRACTICAL NO.2
7. copy
Working: This command copies the file given in ‘source_file’ to destination location. If destination
location
8. move
Working: This command moves the file given in ‘source_file’ to destination location. If destination
location
is not given file is moved to current working directory. Works as cut paste.
9.del
Working: ‘del’ command is used to delete a particular file. Note this command is used to delete file
and not
10. dir
Working: List the contents of directory_name or list the contents of current working directory if
11. path
Syntax: path
Working: This command is used to display or change the list of folders stored in the %PATH%
environment variable.
Working: Set a new path in environment variable ‘path’ for a particular file.
13. cls
Syntax: cls
PRACTICAL NO.2
14. prompt
Working: This command changes the prompt. Special symbols defined are: $$ for $ prompt, $l for <
prompt, $g for > prompt, $p for path prompt. Combinations of these symbols can also be used for
e.g. $p$g
for path> prompt. Here path is nothing but path of current working directory.