Instructor: Prof. Michael P. Harris Chapter 5
ITSC 1405 – Intro to PC Operating Systems Internal Commands – COPY and TYPE

Chapter 5

Internal Commands — Copy and Type

LEARNING OBJECTIVES

1. Explain the purpose and function of internal commands.

2. Explain the purpose and function of the COPY command.

3. List the file-naming rules.

4. Explain the purpose and function of the TYPE command.

5. Explain when and how to use wildcards with the COPY command.

6. Explain the purpose and use of subdirectory markers.

7. Identify the commands that can be used with subdirectories.

8. Explain when and how files are overwritten.

9. Explain the function, purpose, and dangers of concatenating files.

10. Explain setting up Command Line printing in a network lab environment.

11. Compare and contrast printing files using the TYPE and COPY commands.

STUDENT OUTCOMES

1. Copy a file on the same disk using the COPY command.

2. Use wildcards with the COPY command to copy files on the same disk.

3. Display a text file using the TYPE command.

4. Use the COPY command to make additional files on the same disk but in different subdirectories.

5. Use wildcards with the COPY command to copy files on the same disk to a different subdirectory.

6. Use the COPY and DIR commands with subdirectories.

7. Use subdirectory markers with commands.

8. Overwrite a file using the COPY command.

9. Combine the contents of two or more files using the COPY command.

10. Explain setting up Command Line printing in some networked lab environments.

11. Print files.


CHAPTER SUMMARY

1.  One of the major reasons people buy computers is for using application programs that assist people in different tasks.

2.  Application software usually generates data. Both application software and data are stored as disk files.

3.  Usually, only a program can use the data files it creates. A data file without the application program cannot be used.

4.  Another component of the operating system is the commands that allow the user to manage and manipulate program and data files.

5.  The internal commands DIR, COPY, and TYPE allow you to manage the files on a disk.

6.  The file extensions .COM (command file) and .EXE (executable code) tell the operating system that the file is a program.

7.  COPY allows you to copy files selectively.

8.  The syntax of the COPY command is:

COPY [drive:][\][path\]filename [drive:][\][path\]filename

A simple way to remember the COPY syntax is:

COPY source destination

Source is what you want to copy. Destination is where you want it copied.

9.  The COPY command never changes the source file.

10.  When naming files, it is best to stick to alphanumeric characters. Certain characters are illegal, such as the colon (:) and the asterisk (*).

11.  When copying a file to a subdirectory, you must include the path name. The path name and the file name are separated by the backslash (\), which is used as a delimiter.

The one exception is that the root directory’s name is \ (backslash).

12.  Wildcards may be used with the COPY command.

13.  Files must have unique names when on the same drive and in the same subdirectory, but files that are copied to different subdirectories may have identical names because the path makes those file names unique.

14.  TYPE allows you to display the contents of a file on the screen. The syntax is:

TYPE [drive:][\][path\]filename

15.  Wildcards (*, ?) may be used with the TYPE command.

16.  You may use subdirectory markers with the DIR, COPY, and TYPE commands.

17.  If you use *.* with a command, it chooses all the files. Thus, DIR *.* would display all the files. COPY C:\WHATDIR\*.* F:\ would copy all the files in the WHATDIR directory to your Flash Drive F:.

18.  When you move between drives, the operating system remembers the last directory you were in.

19.  Overwriting files with the COPY command is the process in which the contents of the source file copy over the contents of the destination file.

20.  Concatenation means combining the contents of files using the COPY command with either + or a wildcard. There is only one destination file. You should not concatenate program files or data files generated from program files.

21.  You may print the contents of an ASCII file by using the PRINT command with the name of the file or files. You may use multiple file names or use wildcards. Usually the PRINT command automatically ejects the pages.

22.  Printing in a network lab environment requires special accommodations.

23.  You can print the contents of an ASCII file by typing TYPE filename.ext >LPT1 or TYPE filename.ext >PRN. If you are on a network, you may need to know the share-name of your device and it’s UNC… \\servername\sharename. Like this TYPE filename.ext > \\servername\printername. You may have to manually eject the page.

24.  You may print the contents of an ASCII file using,
COPY filename.ext LPT1 -or-
TYPE filename.ext >PRN -or-
PRINT filename.ext.

KEY TERMS

ASCII
concatenation
destination file / LPT1
overwrite
PRN / source file
unformatted text file
Uniform Resource Locator (URL)

Carolyn Z. Gillay, Bette A. Peat, Windows XP Command Line Page 3

Franklin, Beedle & Associates ©2003 ISBN: 1-887902-82-1