4 Lab 4
4 Lab 4
Communication Technologies
(Lab 4)
Ali Hassan
Lab Instructor
Institute of Management Sciences, Peshawar.
CMD NAVIGATION
&
Batch files
Objective of the Lab
• The objective of this lab is to familiarize
students with the use of basic command-
line interface (CLI) commands for file
manipulation, directory navigation, and
simple scripting in Windows
Batch files
• Simple text files containing a series of
commands that get executed in sequence.
• Execution
• From the same Folder
• Via run command
Commands
• ver - Shows the version of Windows OS
• cd - Change Directory, helps you change the
directory
• md - Make directory, creates a directory
• rd - Remove directory, deletes a directory
• cls - Clears the screen
• dir - Shows you all the contents of a directory
• echo - Shows you the message that follows the
command
• exit - Used to close the console
• rem - Comments a command
• start - Starts the program in a new window
Syntax, Variables & Comments
• Syntaxes
• How do you frame your program?
• Variables
• Playing around setting up and passing the
arguments
• Comments
• Controlling what your program shows and
what not
Example File
• @echo off