Download presentation
Presentation is loading. Please wait.
Published byNoreen Gilbert Modified over 9 years ago
1
Ch 51 Internal Commands COPY and TYPE
2
Ch 52 Overview Will review file-naming rules.
3
Ch 53 Overview Will learn some internal commands that can be used to manage and manipulate files.
4
Ch 54 Overview The value of creating and using dummy files will be explained.
5
Ch 55 Overview Will experience naming, managing, manipulating, viewing, and printing files.
6
Ch 56 Overview Use COPY and TYPE commands to perform various tasks.
7
Ch 57 Overview Both concatenation and the consequences of overwriting files will be discussed.
8
Ch 58 Why Learn Command Line Commands? Review of directory management commands: è MD è CD è RD
9
Ch 59 Why Learn Command Line Commands? Directories: è Largest units of information management è Used to organize programs and data files
10
Ch 510 Why Learn Command Line Commands? è Need to know how to manage information at the file level. è Managing files different from creating/changing data within files.
11
Ch 511 Why Learn Command Line Commands? Using the command line will help you understand: è File manipulation è Disk and subdirectory structure
12
Ch 512 Why Learn Command Line Commands? Some tasks are done easier and faster at the command line.
13
Ch 513 Why Learn Command Line Commands? Internal file-management commands: è DIR è COPY è REN è DEL è TYPE
14
Ch 514 The COPY Command COPY command: è Used to copy files from one place to another
15
Ch 515 The COPY Command Reasons for copying files: è Copy files from one disk to another è Make second copy to existing file on same disk è Copy file to device è Making changes of existing file with program that created it è Create backup copy of various data files
16
Ch 516 The COPY Command COPY command syntax: COPY [parameters] [drive:] [path] filename [drive:] [path] filename [parameters]
17
Ch 517 The COPY Command Conceptually the syntax is: COPY source destination
18
Ch 518 Review of File-Naming Rules File-naming Rules: Ê Names of files in directory must be unique. Ë No names can be longer than 255 characters, including file extensions. Ì File extensions are optional.
19
Ch 519 Review of File-Naming Rules File-naming Rules: Í File name must be separated from its extension with a period, called a dot. Î All alphanumeric characters can be used in file names and extensions, except the following illegal characters: “ / \ : | * ? +
20
Ch 520 Review of File-Naming Rules Program files: è Named by programmer è Commonly have.COM,.EXE, or.BAT extensions
21
Ch 521 Review of File-Naming Rules Naming data files: è Use names that reflect file contents è Extensions usually specify type of file è Most application programs assign file extension to data files
22
Ch 522 Activity—Making Copies of Files KEY CONCEPTS: è Function keys correct typing errors è Function of first \ and second \ è Function of dot (.) between file name and file extension è : lets operating system know that the destination is a drive
23
Ch 523 Activity—Making Copies of Files KEY CONCEPTS: è Executed several COPY commands è Used DIR to confirm files copied è Copy and rename files åOn command line - one step åWindows Explorer and My Computer - two steps
24
Ch 524 Using Long File Names Floppy disk: è Long file names - only when necessary è Room for 224 files on Directory Table è Uses old FAT16 file system
25
Ch 525 Using Long File Names Floppy disk: è Designed to hold files with 8.3 rules è Directory table full - cannot add files to disk ( even if there is room )
26
Ch 526 Using Long File Names Fig 5.1 Two Directory Tables p. 192
27
Ch 527 Using Long File Names è At command line enclose entire file name in quotes if it has spaces. è Use /X with DIR to see both short and long name in directory.
28
Ch 528 Using Long File Names Fig 5.2 Directory Showing Short and Long File Names p. 192
29
Ch 529 Using Long File Names For long files names, it is helpful to have meaningful and unique characters within the first six characters of the name.
30
Ch 530 Activity—Copying Files with Long File Names KEY CONCEPTS: è Copied file to data disk è Operating system assigned alias (8.3 file name)
31
Ch 531 Using Wildcards with the COPY Command Using wildcards (* and ?) with the COPY command to copy files can reduce the number of commands that have to be typed in.
32
Ch 532 Using Wildcards with the COPY Command Wildcards used: è With DIR and COPY commands è To change destination name
33
Ch 533 Activity—Using Wildcards with COPY Command KEY CONCEPTS: è Use wildcards to save time when: å Copying files å Viewing files åIf NTFS is file system - copy will copy files in alphabetical order
34
Ch 534 The TYPE Command TYPE command: è Internal command è Opens/displays contents of file on screen åDIR - displays what files are on disk è Must be text/ASCII file for data to be meaningful and readable
35
Ch 535 The TYPE Command TYPE command syntax: TYPE [drive:] [path] filename
36
Ch 536 Activity—Displaying Files Using TYPE Command KEY CONCEPTS: è Text files/ASCII files è Recognizing executable code files by file extensions è Support files è Format - how data is arranged
37
Ch 537 Dummy Files Dummy files: è Files without particular meaning è Usually created for test purposes è Usually smaller and are samples
38
Ch 538 Activity—Using the Copy and Type Commands KEY CONCEPTS: è TYPE can use more than one parameter è DIR - displays current files on disks è TYPE - displays contents of one file at a time
39
Ch 539 Making Additional Files on the Same Disk Can have two files with identical contents on same disk: è Including same name - if files kept in different subdirectories è In same subdirectory - if the names of the files are different.
40
Ch 540 Activity - Using COPY Command KEY CONCEPTS: è Review use of: å MD and (including syntax) å Naming subdirectories å First backslash (\), other (\) å Dot (.) and double dot (..) å Absolute/relative paths è COPY command è Use of wildcards with TYPE command
41
Ch 541 Using Wildcards with the COPY Command Wildcards can be used to copy files in the same drive to a different subdirectory.
42
Ch 542 Using Wildcards with the COPY Command It is crucial that syntax is NEVER altered. COPY source destination
43
Ch 543 Using Wildcards with the COPY Command Files can be “misplaced”: è Computers always follow commands è User must know what the computer was told to do
44
Ch 544 Activity—Using Wildcards with the COPY command KEY CONCEPTS: è Copying/naming files with COPY command è Compare moving/renaming files using GUI vs. doing it at the command line
45
Ch 545 Using COPY and DIR with Subdirectories è COPY command can place file in subdirectories. è DIR command can be used to see if files were copied.
46
Ch 546 Activity—Using COPY with Subdirectories KEY CONCEPTS: è Importance of spacing when keying in commands (COPY command spacing) è Use of \ - as a root, as a delimiter è When to use absolute/ relative path è Changing directories è Using DIR to locate files
47
Ch 547 Using Subdirectory Markers with the COPY Command Can use shortcuts to write commands: è Dot (.) è Double dot (..)
48
Ch 548 Using Subdirectory Markers with the COPY Command è The.. represents parent of current directory. è Only directory that does not have a parent is the root directory.
49
Ch 549 Activity—Using Shortcuts: The Subdirectory Marker KEY CONCEPTS: è Child vs. parent directory è Absolute path è Using.. è Using \ as a delimiter
50
Ch 550 Overwriting Files with the COPY Command Each file must have a unique name on same disk and subdirectory.
51
Ch 551 Overwriting Files with the COPY Command Overwrite: è Old data replaced by new data
52
Ch 552 Overwriting Files with the COPY Command Fig 5.4 Overwriting Files p. 264
53
Ch 553 Overwriting Files with the COPY Command è Overwrite files on regular basis as you want to backup files. è Now Windows informs user that an overwrite will occur.
54
Ch 554 Activity—Overwriting Files Using COPY Command KEY CONCEPTS: è When overwriting is not allowed è Confirmation prior to overwriting
55
Ch 555 Combining Text Files with the COPY Command Concatenation is creating another file by combining contents of two or more text (ASCII) files.
56
Ch 556 Combining Text Files with the COPY Command Concatenation should never be done with program files, or with data files generated by programs.
57
Ch 557 Combining Text Files with the COPY Command To avoid accidental concatenation of files, read all messages DOS displays on the screen.
58
Ch 558 Combining Text Files with the COPY Command è COPY syntax never changes: åCOPY source destination è Plus sign (+) between source files tells OS that you are joining files. è Two or more items separated by pipe symbol (|) - either/or choice
59
Ch 559 Activity—Combining Files Using the COPY Command KEY CONCEPTS: è Where spaces are in COPY command è Join text files with plus sign è Never concatenate: åProgram files åData files created with application programs è Read messages è Only text files can be combined å Wildcards can be used
60
Ch 560 Printing Files è Have not printed contents of any file. è May have: å Redirected output to printer using: ä DIR command ä TYPE command å Copied file to printer
61
Ch 561 Printing Files PRINT command: è Prints contents of files è Automatically ejects pages è Works only for ASCII files
62
Ch 562 Printing Files Data files generated by application programs can only be printed from within application program.
63
Ch 563 Printing Files Reasons for printing ASCII files: è Need hard copy of configuration information on computer è Verify if printer problem is a software problem
64
Ch 564 Printing Files Three ways to print a text file from the command line: è Use PRINT command è Use redirection with DIR command è Copy contents of file to printer
65
Ch 565 Printing Files PRINT command syntax: PRINT [D:device] [[drive:] [path] filename […]]
66
Ch 566 Printing in a Lab Environment Printing is complicated without a local printer.
67
Ch 567 Activity- Setting Up Printing in a Lab Environment KEY CONCEPTS: è Created shortcut to enable printing on the desktop è Created second shortcut on desktop to disable command line printing
68
Ch 568 Activity—Printing Files KEY CONCEPTS: è Print job è Status report è Can direct output to screen or another device è Cannot use redirection with COPY command
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.