Ci180013 Lab1 Os
Ci180013 Lab1 Os
1. A) Syntax
- The syntax of a command refers to the rules in which the command must be run in
order for a piece of software to understand it.
B) Paths
- Tells DOS which directories should be searched for external commands after DOS
searches you’re working directory.
C) Switches
- A switch is a code, or parameter, that modifies a command. DOS switches use a
forward slash (not a backslash) followed by some letter, digit or code.
E) Batch files
- A batch file is simply a text file that you can create by using unformatting text editor
tools the EDIT command in MS-DOS.
2. (a) Directory command: lists the names of files and directories in the current
directory.
Ex: “com*” >> it will display files such as computer.txt, communication.doc and
compile.txt.
“communication?.doc” >> it will display files such as communication.doc.
Code(Hex) color
0 Black
1 Blue
2 Green
3 Cyan
4 Red
5 Magenta
6 Yellow/brown
7 White
8 Grey
9 Bright blue
A Bright green
B Bright cyan
C Bright red
D Bright magenta
E Bright yellow
F White
6.
Copy Xcopy
- Specifies the directory and/or filename for - Specifies the location and/or name of new
the new file(s). files.
-Copies one or more files to another - Copies files and directory trees.
location.
- Example: -Example:
>copy “D:\quiz1.xls” >xcopy “D:\Xiaomi” “D:\Xiaomi\Xiaomi
“D:\Xiaomi\quiz1.xls” Copy”
Copy:
Xcopy:
7. Using the appropriate command, explain how to solve the following situations.
(a) to combine “quiz1.xls”, “quiz2.xls” and “quiz3.xls” into one file named “report.xls”
in the current directory:
C:\> copy D:\quiz1.xls + quiz2.xls + quiz3.xls D:\report.xls
(b) to combine all files in the current directory on the current drive that have the
extension “.xls” into one file named “combined.xls”:
C:\> copy D:\*.xls + *.xls + *.xls D:\combined.xls
(c) to combine first all files with the “.txt” extension, then all files with the “.doc”
extension and all files with the “.xls” extension into one file named “combined.doc”:
C:\> copy D:\*.xls + D:\*.doc + D:\*.txt D:\combined.doc