batch file basics
Post on 24-Feb-2016
Embed Size (px)
DESCRIPTIONBatch File Basics. Automate repetitive computer processes Friday, March 12, 2014 Presented by Thomas Redd, STS, Granite School District. Why Create a Batch File?. Multiple commands Executed in order Several tasks accomplished in a batch Launch multiple operations quickly and easily - PowerPoint PPT Presentation
Batch File Basics
Batch File BasicsAutomate repetitive computer processesFriday, March 12, 2014Presented by Thomas Redd,STS, Granite School DistrictWhy Create a Batch File?Multiple commandsExecuted in orderSeveral tasks accomplished in a batchLaunch multiple operations quickly and easily
Why not?Getting InstructionsDownload Document file of complete instructions here. http://41eq.qr.ai
Creating the Batch FilePrograms you will needNotePadCommand WindowUnderstanding of basic computer commandsMost DOS commands are availableHelp with syntax is available in the Command WindowGetting organizedKnow what you need to accomplishDecide in which order to do your tasks Create a folder of needed installers and iconsLocate this folder in an easily accessible locationShould it be on the shared drive?Should it be in your personal documents?Should it be on a portable drive?Getting StartedOpening the Command WindowClick the Start button Type CMDPress Enter
The Command Box appears
Getting StartedOpening NotePadClick the Start buttonClick All ProgramsClick AccessoriesClick NotePadNotePad will open.
Getting StartedPosition both boxes conveniently on your screen
Getting StartedTest commands in the Command box
Getting StartedCompile a list of instructions in NotePadOne command per line
Getting Help with CommandsAt the prompt, type Help and Enter for a list of commands
Specific Command HelpFor more information on a specific command, type HELP (command-name)
Specific Command HelpOr you could type the command and /?Example: xcopy /?
Command SyntaxCommandLocations for command operationRequired or optional control switches that Control the command operation
CommandLocations for operationRequired or optional control switches that Control the command operationAdditional Control Switch InstructionsSample Batch FileS:Cd\Cd Valley_CrestCd tjreddDirDir > listfiles.txtXcopy *.* f:\home /e/s/d/yChanges to the S DriveChanges to the root directoryChanges to Valley Crest DirectoryChanges to the tjredd sub-directoryLists a directory of files on the screenWrites a list of files in this folder to a file called listfiles in this folderCopies all files in the directory to a folder of an external drive (f:) in a folder called homeOver writing previous files, and including all new Changes.Saving Your Batch FileSave your NotePad file with a .bat endingSave it to the folder you want it in
Using your Batch FileNavigate to your file locationDouble click the batch file
When the black box goes away, the tasks have been completed
My Student Icon install batchs:Cd\Valley_Crest\toms-icons-windows-7\icons-windows-7ValleyCrestILE.msicopy Windows*Live*Movie*Maker.* c:\Users\Public\Desktop /d/ycopy Valley*Crest*Elementary.* c:\Users\Public\Desktop /d/ycopy Student*Help*Files.* c:\Users\Public\Desktop /d/ycopy Road*to*Success.* c:\Users\Public\Desktop /d/ycopy Microsoft*Excel*2010.* c:\Users\Public\Desktop /d/ycopy Microsoft*PowerPoint*2010.* c:\Users\Public\Desktop /d/ycopy Microsoft*Publisher*2010.* c:\Users\Public\Desktop /d/ycopy Microsoft*Word*2010.* c:\Users\Public\Desktop /d/ycopy Go*Math*7.* c:\Users\Public\Desktop /d/ycopy SongsmithSetupAcademic.msi c:\*.*cd MuseScore*Program
Go to the S DriveChange to the correct folderCreate the Imagine Learning English Icon on the desktopMany Icons placed of the desktop of all usersChange to directory containing install filesNote that the * is a wild card . In this file, it represents a space as well as the Lnk file endingCopy the Songsmith Program to the C driveMy Student Icon install batch (continued)MuseScore-1.3.execopy FluidR3_FM.sf2 C:\Program*Files*(x86)\MuseScore\soundCd S:\Valley_Crest\Maintenance\toms-Icons-Windows-7\ilesetupPstory.msiMicrosoftAutoCollageAcademicSetup.msiCd\s:\NE-STS_Shared\LanSchool_v18.104.22.168\WindowsStudent.msipausecd\Valley_Crest\toms-icons-windows-7\icons-windows-7pauseatubecatcher.exe
Install MuseScore, a Music Notation programCopy improved sound files to MuseScore sound directoryChange to another directory containing Install filesInstall Photo Story 3 for WindowsInstall Microsoft AutoCollageChange to S Drive NE-STS Shared folder, the LanSchool install directoryInstall Student LanSchool ProgramA Pause is required to make LanSchool install correctly. The message Press any key to continue appears in the command box when the install is completeChange to another folder of install filesAnother pause before installing is required to make aTube Catcher install correctlyInstalls aTube Catcher.
This is the last command to run.
After installing, the Command Box will close showing that the install process is completeWhere are my Files?
My files are stored in a hidden folder on the school shared driveStore files where?Create a folder that will have proper accessHidden file? Student access? Teacher access? In your personal document folder?Copy install files to that folderCreate wanted desktop iconsCopy icons to that folderCopy any wanted files (text or other) to that folder
Preparing a ComputerRe-image a machineLog inNavigate to your batch fileDouble click the batch fileWatch the work be done for you quickly and completely with no human error or omissionsBatch files can be activated with LanSchoolAll machines are identicalSmile and log off
This is what my completed computer desktop will look like after running the batch fileGetting InstructionsDownload document file of complete instructions here. http://41eq.qr.ai or QR code:
Link Valid untilApril 1, 2014
Also Posted on Tomshelppages.weebly.com