Lab Assignment 4 Using Batch Files

Slides:



Advertisements
Similar presentations
Installing DOS and Windows98 under MS Virtual PC.
Advertisements

1 After completing this lesson, you will be able to: Compose, address, and send messages. Format the body of a message. Attach a file to a message. Check.
Never lose your data again!
MS-Word XP Lesson 1.
Macintosh OS X. What is an operating system? O Like cars, computers have operating systems (sometimes abbreviated OS). O A computer operating system is.
HOW TO IMPORT AND EXPORT DATA. Why do I need to use Export/Import? Here are some examples: If you have a laptop that you take home (or have a home version.
 Use the Left and Right arrow keys or the Page Up and Page Down keys to move between the pages. You can also click on the pages to move forward.  To.
Access - Project 1 l What Is a Database? –A Collection of Data –Organized in a manner to allow: »Access »Retrieval »Use of That Data.
Additional information
FIRST COURSE Getting Started with Microsoft Office 2007.
Scite Scintilla integrated text editor. Click here.
Course Orientation Assignments Tool. If the Assignments tool has been added to the course, use the Assignments link in the Course Menu to access upcoming.
The Internet. Telnet Telnet means using your computer as a terminal. All commands you type are sent to the host computer you are connected to and executed.
FIRST COURSE Getting Started with Microsoft Office 2007.
The sequence of folders to a file or folder is called a(n) ________.
Sending and receiving s Section 6. Objectives Students will deal with messages, send and receive messages, reply to s, sorting s and how.
Ch 111 Chapter 11 Advanced Batch Files. Ch 112 Overview This chapter focuses on batch file commands that allow you to:  write sophisticated batch files.
Ch 101 Introduction to Batch Files. Ch 102 Overview Will learn to create batch files to automate a sequence of commands to accomplish various tasks.
Or CMD/BATCH.  Title this comand makes the cmd prompt’s title whatever you would like it to be.
Programming Batch Files Aim: To introduce the concept of Batch processing and programming techniques. Lesson Outcomes  The need for Batch Processing.
Ch 71 Using ATTRIB, SUBST, XCOPY, DOSKEY, and the Text Editor.
Enter your Organization Code, Username and Password. These will be provided to you by your iAdvantage Administrator. Note that these entries.
Teach Yourself Windows 98 Module 2: Working with Files, Folders, and the Desktop.
For Version 6.0 and later Lattice3D Reporter Tutorial For Version 6.0 and later LATTICE TECHNOLOGY, INC.
Advising Notes in DegreeWorks A Guide for Faculty Advisers.
®® Microsoft Windows 7 for Power Users Tutorial 13 Using the Command-Line Environment.
Mail merge I: Use mail merge for mass mailings Perform a complete mail merge Now you’ll walk through the process of performing a mail merge by using the.
Click your mouse to continue. Ways to Merge Data When you have finished editing your main document and inserting the merge fields, you have several choices.
Ch 101 Chapter 10 Introduction to Batch Files. Ch 102 Overview A batch file is a text file that contains an ordered series of commands.
Shell Scripting Introduction. Agenda What is Shell Scripting? Why use Shell Scripting? Writing and Running a Shell Script Basic Commands -ECHO - REM.
Office 2003 Advanced Concepts and Techniques M i c r o s o f t Word Collaboration Feature Using Word’s Collaboration Tools.
Open the Goodyear Homepage Click on Teacher Tools.
Selecting, Formatting, and Printing a finished Report…….
1 ITI 1120 Lab # 1 An Introduction to the Lab Environment Contributors: G. Arbez, M. Eid, D. Inkpen, A. Williams, D. Amyot.
Creating a Form on a Web Page
Command Prompt Chapter 10 Introduction to Batch Files Richard Goldman February 7, 2000.
Windows Tutorial Common Objects ACOS: 1, 4. Using the Taskbar 1. Using the taskbar, you can switch between open programs and between open documents within.
Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt.
Windows Listening Guide.  The software that manages the sharing of the resources of a computer. The overall function of the computer.  MASTER CONTROLLER.
EPat Electronic Practice Assessment Tool An Overview Creating a shortcut on the desktop.
Project 6 Advanced File and Web Searching. 2 CHAPTER OBJECTIVES  Begin a new file or folder search, save a search, and find a file using a saved search.
FIRST COURSE Getting Started with Microsoft Office 2007 COM111 Introduction to Computer Applications.
The Cisco Binary Game INSTALLING THE GAME Extract Set-up File Double click Binary_setup.zip Save to computer Launch Set-up Click binary_setup.exe Follow.
APPLICATION SHARING IN COLLABORATE. CLICK THE APPLICATION SHARING ICON After you click here, a window will open asking which application you would like.
Click your mouse to continue. The Office Shortcut Bar The Office Shortcut Bar contains program buttons that, when clicked, start new documents or start.
Lab Assignment 1 Getting Started. Submitting the LABS for grading Subject line of message: CTEC 110 WA Lab 1 Assignments Attachment file names:
CMPF124: Basics Skills for Knowledge Workers Manipulating Windows GUI.
Lab 0 / Chapter 0 Windows XP Environment. 2 User Interfaces: A different perspective.
Files, User Interfaces, and the OS Files: programs (.exe); data (.jpg,.html,.doc, etc.) User Interface: used to run programs and manage files and folders.
Lab Assignment 2 Common DOS Commands. Submitting the LABS for grading Subject line of message: CTEC 110 WA Lab 2 Assignments Attachment file names:
Learning to use the Interactive Online Classroom Classroom Activities.
All sections to appear here Welcome to my pptPlex Slide Show, this can be executed in either two ways: 1.As a normal PowerPoint slide show: Example hit.
Microsoft Windows 7 Chapter 3 File and Folder Management.
PART 2 INTRODUCTION TO DYNAMIC WEB CONTENT AND PHP.
The desktop (overview) Working with desktop icons The desktop is the main screen area that you see after you turn on your computer and log on to Windows.
You may have already done this… Download the class files to the desktop Expand those files into root of USB stick Change your USB stick to drive “Z”!
HTML Concepts and Techniques Fifth Edition Chapter 3 Creating Web Pages with Links, Images, and Formatted Text.
Landscaper 101. Time Code AMC AMCNET HELP!!! Where do you go for help? –Upper right corner has a ? for the online help –This presentation.
Windows 95/NT/XP. What is Windows 95/NT/XP n A program that sets up an environment for you to work in on your computer, based on colorful pictures (icons)
1 Microsoft Project 2003 Starting a New Project. 2 Creating a new project plan To start Microsoft Project, click the Windows Start menu. Point to All.
PestPac Software. Leads The Leads Module allows you to track all of your pending sales for your company from the first contact to the close. By the end.
Creating and Editing a Web Page
XP New Perspectives on Microsoft Windows XP Tutorial 2 1 Microsoft Windows XP Working with Files Tutorial 2.
Submission of projects in Oncourse Computer Science and Computer Information IUPUI.
Customizing Menus and Toolbars CHAPTER 12 Customizing Menus and Toolbars.
Creating Web Pages with Links, Images, and Embedded Style Sheets
Fundamentals of Windows Mouse n 4 Basic Operations: –Pointing –Clicking –Double Clicking –Dragging.
Creating a Powerpoint Presentation
Project and Assignment Submission
Day 4: Modifying Page Layout and Printing your Documents
Presentation transcript:

Lab Assignment 4 Using Batch Files

Submitting the LABS for grading Subject line of email message: CTEC 110 WA Lab 4 Assignments Attachment file names: DOS Lab 4-A, DOS Lab 4-B, DOS Lab 4-C, DOS Lab 4-D, DOS Lab 4-E , DOS Lab 4-F Inserted Textual First Line of “each” Lab Assignment: Name, CTEC 110 WA, DOS Lab 4-A Name, CTEC 110 WA, DOS Lab 4-B Name, CTEC 110 WA, DOS Lab 4-C Name, CTEC 110 WA, DOS Lab 4-D etc… (Where Name is your first and last name such as: David Sims (Add one blank line after the first line for readability.) Lab 4 Assignments (24 slides) CTEC 110

4-A Activity Writing and Executing a Batch File Setup the USB drive for use Clear the command screen Setup the disks for section 10 Change to the root of the O: Drive Create a batch file called EXAMPLE.BAT Lab 4 Assignments (24 slides) CTEC 110

4-A Activity Writing and Executing a Batch File Enter the following commands: DIR *.NEW DIR G:\WUGXP\*.FIL Save the batch file Verify that the batch file exists Execute the batch file Snapshot the screen results and save Lab 4 Assignments (24 slides) CTEC 110

4-B Activity Creating a Shortcut for a Batch File Right click on the Windows desktop Select new shortcut Type in the following: G:\WUGXP\GAMES\BOG2\BOG.EXE Select Next and give the name of “My BOG Game” for the shortcut Click Finish Lab 4 Assignments (24 slides) CTEC 110

4-B Activity Creating a Shortcut for a Batch File You should now see: As a selection on your desktop now Right click the icon and select properties Push the “Change Icon” button Select Browse C:\Windows\System32\shell32.dll Open Choose the “golden star” icon to use and double click it Your icon should now be: Lab 4 Assignments (24 slides) CTEC 110

4-B Activity Creating a Shortcut for a Batch File Now select the properties again for the shortcut on the desktop Use the snipping tool and take a “window snip” of the shown properties window Save the snap shot in a Word document for this activity Lab 4 Assignments (24 slides) CTEC 110

4-C Activity Using Replaceable Parameters Clear the command screen Change to the root of the O Drive COPY CLASS\JUP.* COPY JUP.BUD JUP.XYZ Display the contents of the file JUP.XYZ Display the file name only at this location Destroy this file with ECHO > JUP.XYZ Display the contents again of JUP.XYZ Lab 4 Assignments (24 slides) CTEC 110

4-C Activity Using Replaceable Parameters Display the file name again of JUP.XYZ Create a batch file called KILLIT.BAT Enter these commands: ECHO > JUP.XYZ TYPE JUP.XYZ DEL JUP.XYZ save the batch file Display the contents of KILLIT.BAT Execute this batch file Lab 4 Assignments (24 slides) CTEC 110

4-C Activity Using Replaceable Parameters Re-Edit this file using notepad Add these lines to the top REM This batch file will make REM the data in a file difficult to recover. DIR %1 PAUSE You are going to kill the file, %1. Are you sure? Replace ECHO > JUP.XYZ with ECHO > %1 Delete the line: TYPE JUP.XYZ Replace DEL JUP.XYZ with DEL %1 Save the file and exit notepad Lab 4 Assignments (24 slides) CTEC 110

4-C Activity Using Replaceable Parameters Display the contents of the KILLIT.BAT file Now use the batch file to kill the file JUP.BUD Check to see if the file is gone Snapshot the screen results and save Lab 4 Assignments (24 slides) CTEC 110

4-D Activity Multiple Replaceable Parameters Clear the command screen Change to the root of the O Drive Create a new batch file called MULTI.BAT Enter the following commands: REM This is a sample batch file REM using more than one replaceable parameter TYPE %3 COPY %1 %2 TYPE %1 Save the batch file Lab 4 Assignments (24 slides) CTEC 110

4-D Activity Multiple Replaceable Parameters Display the contents of MULTI.BAT COPY CLASS\VEN.* Give the following command: MULTI VEN.ABC JUP.ABC FILE2.SWT Snapshot the screen results and save Lab 4 Assignments (24 slides) CTEC 110

4-E Activity Multiple Replaceable Parameters Clear the command screen Change to the root of the O: Drive Create a new batch file called NOCOPY.BAT Enter the following commands: REM This batch file, NOCOPY.BAT, will hide specified files, REM then copy all other files from one location to another, REM then unhide the original files. ATTRIB +H %1 COPY %3\*.* %2 ATTRIB -H %1 Save the batch file Lab 4 Assignments (24 slides) CTEC 110

4-E Activity Multiple Replaceable Parameters Display the contents of NOCOPY.BAT Execute the batch file: NOCOPY CLASS\*.ABC TRIP CLASS Display the files with “ABC” as the extension in the directory CLASS Display the files with “ABC” as the extension in the directory TRIP Snapshot the screen results and save Lab 4 Assignments (24 slides) CTEC 110

4-F Activity Using CHOICE,CALL,GOTO & IF We are going to create three batch files CHOOSE.BAT MENU.BAT OTHER.BAT CHOOSE.BAT will use a choice variable MENU.BAT is a called menu batch file OTHER.BAT will use CHOICE command Lab 4 Assignments (24 slides) CTEC 110

4-F Activity Using CHOICE,CALL,GOTO & IF Clear the command screen Create the CHOOSE.BAT file: @ECHO OFF CLS ECHO. ECHO THIS IS THE CHOOSE.BAT BATCH FILE EXAMPLE! ECHO ############### ECHO 1. Print Hello ECHO 2. Print Bye ECHO 3. Print Test ECHO E To Exit this batch file Lab 4 Assignments (24 slides) CTEC 110

4-F Activity Using CHOICE,CALL,GOTO & IF Continued..part 2: CHOOSE.BAT file SET /p choice=Type the number to print text. IF '%choice%'=='1' goto hello IF '%choice%'=='2' goto bye IF '%choice%'=='3' goto test IF '%choice%'=='E' goto stop IF not '%choice%'=='' ECHO "%choice%" is not valid please try again ECHO. goto END :HELLO ECHO Hello :BYE ECHO Bye Lab 4 Assignments (24 slides) CTEC 110

4-F Activity Using CHOICE,CALL,GOTO & IF Continued..part 3: CHOOSE.BAT file goto END :TEST ECHO Test :END PAUSE GOTO START :STOP ECHO . ECHO You have chosen to terminate CHOOSE.BAT! Lab 4 Assignments (24 slides) CTEC 110

4-F Activity Using CHOICE,CALL,GOTO & IF Create the MENU.BAT file: @ECHO off CLS ECHO. ECHO THIS IS THE OTHER.BAT and MENU.BAT BATCH FILE EXAMPLE ECHO ############### ECHO 1. Print Hello ECHO 2. Print Bye ECHO 3. Print Test ECHO E To Exit this batch file Lab 4 Assignments (24 slides) CTEC 110

4-F Activity Using CHOICE,CALL,GOTO & IF Create the OTHER.BAT file: @ECHO off :BEGIN CALL MENU.BAT CHOICE /N /C:123E /M "MAKE YOUR SELECTION: " IF ERRORLEVEL ==4 GOTO STOP IF ERRORLEVEL ==3 GOTO TEST IF ERRORLEVEL ==2 GOTO BYE IF ERRORLEVEL ==1 GOTO HELLO ECHO Not a valid selection! please try again... ECHO. goto END :HELLO ECHO Hello Lab 4 Assignments (24 slides) CTEC 110

4-F Activity Using CHOICE,CALL,GOTO & IF Continue..part 2: OTHER.BAT file :BYE ECHO Bye goto END :TEST ECHO Test :END PAUSE GOTO BEGIN :STOP ECHO . ECHO You have choosen to terminate OTHER.BAT! Lab 4 Assignments (24 slides) CTEC 110

4-F Activity Using CHOICE,CALL,GOTO & IF Exit and save the batch file Type CHOOSE.BAT MENU.BAT OTHER.BAT Snapshot the screen and save Execute CHOOSE.BAT Enter 1 Enter 2 Enter 3 Enter E Snapshot the screen and add to bottom Lab 4 Assignments (24 slides) CTEC 110

4-F Activity Using CHOICE,CALL,GOTO & IF Execute MENU.BAT Snapshot the screen and add to the bottom Execute OTHER.BAT Enter 1 Enter 2 Enter 3 Enter E Snapshot the screen results, add to the bottom and save After you are satisfied with all the DOS Lab activity results email all the results to your instructor as one message with attachments. Lab 4 Assignments (24 slides) CTEC 110