100% found this document useful (1 vote)
853 views5 pages

Lab 1

This document defines various computer-related terms and provides examples of commands in DOS/Windows. It defines syntax, paths, switches, and command line statements. It also discusses the directory, copy, and erase commands and provides examples of their usage. It describes OpenVMS, DOS, and Unix operating systems. It explains how to set background and foreground colors in DOS. It lists conventions for file names. It compares the copy and xcopy commands and provides examples of using copy to combine multiple files into one file.

Uploaded by

Muhammad Hafiz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
853 views5 pages

Lab 1

This document defines various computer-related terms and provides examples of commands in DOS/Windows. It defines syntax, paths, switches, and command line statements. It also discusses the directory, copy, and erase commands and provides examples of their usage. It describes OpenVMS, DOS, and Unix operating systems. It explains how to set background and foreground colors in DOS. It lists conventions for file names. It compares the copy and xcopy commands and provides examples of using copy to combine multiple files into one file.

Uploaded by

Muhammad Hafiz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

ANSWERS

1.
(a) Syntax
-The arrangement of words and phrases to create well-formed sentences in a language.
(b) Paths
-The order in which an operating system or programme searches for a file or executable
program.
(c) Switches
-A program variable that activates and deactivates a certain function of a program.
(d) Command line statements
-The space to the right of the command prompt on an all-text display mode on a computer
monitor in which a user enters commands and data.
(e) Batch files
-A computer file containing a list of instructions to be carried out in turn.

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.

(b) Copy command: copy files to another location.


Ex: sam* >> it will copy files such as sample.txt, sampling.txt and Samsung.doc.
sampl?.txt >> it will copy files such as sample.txt and sampl1.txt.

(c) Erase command: deletes specified files.


Example: doc* >> it will delete files such as document.txt, doc1.txt and doctor.doc.
doc?.txt >> it will delete file such as doc1.txt.

3.
- OpenVMS
- DOS
- Unix

4.

C:\Users\uthm > color 0A


The first character represents background colour and the second character represents
foreground colour.
0 = Black
A = Light green

5.
-File length up to 78 characters including the extension.
-The naming cannot containing \, /, :, *, ?, , <, > or | symbols.
-The base name and extension must be separated by a period.

6.

Copy
- Specifies the directory and/or filename for
the new file(s).
-Copies one or more files to another
location.
- Example:
>copy
D:\quiz1.xls
D:\Xiaomi\quiz1.xls

Copy:

Xcopy:

Xcopy
- Specifies the location and/or name of new
files.
- Copies files and directory trees.
-Example:
>xcopy D:\Xiaomi D:\Xiaomi\Xiaomi
Copy

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

You might also like