Command Prompt Using Copy, Type, and Wildcards

Slides:



Advertisements
Similar presentations
DOS commands.
Advertisements

A batch file is a file that contains a number of DOS commands, each of which could be run individually from the command prompt. By putting them into a.
Working with Files How to create, view, copy, rename and print files.
Linux+ Guide to Linux Certification, Second Edition
CS 497C – Introduction to UNIX Lecture 12: - The File System Chin-Chih Chang
CIS 240 Introduction to UNIX Instructor: Sue Sampson.
Command Prompt Chapter 7 Using ATTRIB, SUBST, XCOPY, DOSKEY, and the MS-DOS Text Editor Richard Goldman ©January 31, 2000.
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. 1 Third Edition Chapter 4 Disk Operating System (DOS) and the Command-Line Interface McGraw-Hill.
"Two of the most famous products of Berkeley are LSD and Unix. I don't think that this is a coincidence.” Anonymous.
Chapter 2 Basic SQL SELECT Statements
Ch 51 Internal Commands COPY and TYPE. Ch 52 Overview Will review file-naming rules.
DOS Commands What is a command Types of DOS Commands Basic Terms
Using Hard Drives Additional information.  Hierarchical Filing Systems  Why Organize a Hard Disk?  Relative and Absolute Paths  Subdirectory Markers.
Lesson 7-Creating and Changing Directories. Overview Using directories to create order. Managing files in directories. Using pathnames to manage files.
Linux Directory Navigation. File & Directory Commands This is a minimal list of Unix commands that you must know for file management: ls (list) mkdir.
Ch 21 Command Syntax Using the DIR Command with Parameters and Wildcards.
®® Microsoft Windows 7 for Power Users Tutorial 13 Using the Command-Line Environment.
Ch 41 Program Files, Data Files, and Subdirectories.
Linux+ Guide to Linux Certification, Third Edition
Command Prompt Chapter 10 Introduction to Batch Files Richard Goldman February 7, 2000.
Week 3 Exploring Linux Filesystems. Objectives  Understand and navigate the Linux directory structure using relative and absolute pathnames  Describe.
Operating Systems Concepts 1/e Ruth Watson Chapter 3 Chapter 3 DOS Ruth Watson.
Common DOS Commands Additional information. Important DOS Concepts Common DOS Commands  Why format a disk?  Partitioning and Formatting disks  Structure.
Basic MS-DOS. History MS-DOS 1.0 was released in August 1981, and was updated until April 1994 when it was replaced by Windows 95 All versions of windows.
Shell Advanced Features. Module 8 Shell Advanced Features ♦ Introduction In Linux systems, the shells are often referred to as command line interfaces.
Lab Assignment 1 Getting Started. Submitting the LABS for grading Subject line of message: CTEC 110 WA Lab 1 Assignments Attachment file names:
File and Folder CLI Commands 12/24/ Agenda Overview of OS functions and the SHELL Internal v External Commands Command History Making & Modifying.
Multiplication Facts Table of Contents 0’s 1’s 2’s 3’s 4’s 5’s 6’s 7’s 8’s 9’s 10’s.
Basic DOS How to get some work done. It’s all a file Everything is a file: OS files, Application files, Data files and Game files Files have 8.3 names:
The Command Line Yep, you need to know this. The Basics Start with the Prompt, what the computer tells you when ready for a command You type a command.
1 Chapter 2 Basic SQL SELECT Statements. 2 Chapter Objectives Distinguish between an RDBMS and an ORDBMS Identify keywords, mandatory clauses, and optional.
Command Prompt Chapter 9 Pipes, Filters, and Redirection ©Richard Goldman 11/30/2000 Revised 10/16/2001.
Linux+ Guide to Linux Certification, Second Edition Chapter 4 Exploring Linux Filesystems.
Basic Unix Commands. Listing files and directories ● ls:command is used to list the files and ● directories in present working directory ● ls command.
Batch Files More flow of control Copyright © by Curt Hill.
IST 222 Day 6. DOS Naming Conventions A filename contains up to 8 characters, a separating period, and a file extension of up to three characters This.
CMSC 104, Version 9/011 Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux Commands Reading None.
Fundamentals of Windows Mouse n 4 Basic Operations: –Pointing –Clicking –Double Clicking –Dragging.
Mostly MS Dos with some UNIX/LINUX
Yep, you need to know this
LINUX LANGUAGE MULTIPLE CHOICE QUESTION SET-5
Bash Introduction (adapted from chapters 1 and 2 of bash Cookbook by Albing, Vossing, & Newham) CPTE 440 John Beckett.
INTERNAL COMMANDS CLS(Clear Screen):-
The Command Prompt Commands are the way to “do things” in Unix
Shell Scripting March 1st, 2004 Class Meeting 7.
Arrays and files BIS1523 – Lecture 15.
Command Syntax Chapter 2 Using the DIR Command with
Chapter 6 Windows 9x/Me Commands and Startup Disk
Introduction to MS-DOS
Exploring the UNIX File System and File Security
Managing Files and Folders
Operating Systems and Using Linux
Operating Systems and Using Linux
Dots 5 × TABLES MULTIPLICATION.
Dots 5 × TABLES MULTIPLICATION.
Dots 2 × TABLES MULTIPLICATION.
Access: Queries IV Participation Project
Operating Systems and Using Linux
Operating Systems and Using Linux
Dots 3 × TABLES MULTIPLICATION.
Dots 6 × TABLES MULTIPLICATION.
Lesson 3 Chapter 10.
Operating Systems and Using Linux
Dots 2 × TABLES MULTIPLICATION.
Dots 4 × TABLES MULTIPLICATION.
Module 6 Working with Files and Directories
Lab 2: Terminal Basics.
In the last class… The vi basics command, input and ex mode
Dots 3 × TABLES MULTIPLICATION.
Command Prompt Using DEL, DELTREE, RENAME and MOVE
Presentation transcript:

Command Prompt Using Copy, Type, and Wildcards ©Richard Goldman January 18, 2000

Copy Command Makes a copy of a file(s) and places it (them) where you want. Logic: COPY Source Destination Syntax: Copy [drive:][path]filename [drive][path]filename Example: C:>Copy A:\Students\John.new D:\Grads\Smith.C00

File-naming Rules .COM, .EXE, .SYS, (.BAT) File names in a directory must be unique. File length Dos 6.22 and earlier – 8.3 Win 95 and later – 255 characters (LFN that include spaces must be enclosed in quotes) File extensions optional Illegal characters “ / \ : | > < * ? Common program file extensions .COM, .EXE, .SYS, (.BAT)

Using Long File Names Don’t use unless necessary They fill up the directory table very fast Directory Listings (/X) 8.3 versions displayed on left LFN versions displayed on right Truncated LFN’s are displayed with shortened name appended with a tilde (~) and a number. Random numbers are used in the name after the 4th. RICHAR~1.ABC RICHARD GOLDMAN MATH.ABC RICHAR~2.ABC RICHARD GOLDMAN SCIENCE.ABC RICHAR~3.ABC RICHARD GOLDMAN HEALTH.ABC RICHAR~4.ABC RICHARD GOLDMAN ENGLISH.ABC RI3491~1.ABC RICHARD GOLDMAN CHEMISTRY.ABC RI3492~1.ABC RICHARD GOLDMAN BIOLOGY.ABC Use quotes to enclose LFN’s with imbedded spaces. C:\>COPY “Jack and Jill.fun” A:JaJ.fun

Using Wildcards with Copy C:\>COPY *.TMP A:*.NEW Copies all files with a .TMP extension from the root drive of C: to the root drive of A: In the process it changes the extension of the copied files to .NEW.

The Type Command Type displays the contents of a file on the screen. Type is an Internal command. Syntax: TYPE [drive:][path]filename Example: C:>TYPE A:\Students\John.new

. (Single Dot) = Current directory .. (Double Dot) = Parent directory Subdirectory Markers . (Single Dot) = Current directory .. (Double Dot) = Parent directory As a shortcut, you may substitute .. In the command line for the name or the parent directory.

Overwriting with the Copy Command Copying a file to a different directory that contains a file with the same name allows you to overwrite (replace) the original file. DOS will ask you if you are about to overwrite a file. If you answer Yes – the specific file will be replaced. If you answer No – that specific COPY will be aborted. If you have selected multiple files and answer All – then all files will be replaced.

Combining Text Files with Copy Concatenation is a method of creating a new file out of two or more smaller files. Normally concatenated files should only be used with text files. Syntax: COPY Source1 + Source2 Destination Example: C:>Copy A:\1HW + A:\2HW C:\Ch5.NEW